whitespace-format 0.0.4__tar.gz → 0.0.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: whitespace-format
3
- Version: 0.0.4
3
+ Version: 0.0.6
4
4
  Summary: Linter and formatter for source code files and text files
5
5
  Home-page: https://github.com/DavidPal/whitespace-format
6
6
  License: MIT
7
7
  Author: David Pal
8
8
  Author-email: davidko.pal@gmail.com
9
- Requires-Python: >=3.7.2,<4.0.0
9
+ Requires-Python: >=3.8.0,<4.0.0
10
10
  Classifier: License :: OSI Approved :: MIT License
11
11
  Classifier: Programming Language :: Python
12
12
  Classifier: Programming Language :: Python :: 3
@@ -14,6 +14,8 @@ Classifier: Programming Language :: Python :: 3.8
14
14
  Classifier: Programming Language :: Python :: 3.9
15
15
  Classifier: Programming Language :: Python :: 3.10
16
16
  Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
17
19
  Project-URL: Repository, https://github.com/DavidPal/whitespace-format
18
20
  Description-Content-Type: text/markdown
19
21
 
@@ -49,7 +51,7 @@ second time (with the same parameters) has no effect.
49
51
  pip install whitespace-format
50
52
  ```
51
53
 
52
- Installation requires Python 3.7.5 or higher.
54
+ Installation requires Python 3.8.0 or higher.
53
55
 
54
56
  ## Usage
55
57
 
@@ -61,17 +63,18 @@ whitespace-format \
61
63
  --normalize-new-line-markers \
62
64
  foo.txt my_project/
63
65
  ```
64
- The command above formats `foo.txt` and all files contained `my_project/` and
65
- its subdirectories. Files that contain `.git/` or `.idea/` in their (relative)
66
- path are excluded. For example, files in `my_project/.git/` and files in
67
- `my_project/.idea/` are excluded. Likewise, files ending with `*.pyc` are
68
- excluded.
69
-
70
- If you want only know if any changes **would be** made, add `--check-only` option:
66
+ The command above formats `foo.txt` and all files contained in `my_project/`
67
+ directory and its subdirectories. Files that contain `.git/` or `.idea/` in
68
+ their (relative) path are excluded. For example, files in `my_project/.git/`
69
+ and files in `my_project/.idea/` are excluded. Likewise, files ending with
70
+ `*.pyc` are excluded.
71
+
72
+ If you want to know only if any changes **would be** made, add `--check-only`
73
+ option:
71
74
  ```shell
72
75
  whitespace-format \
73
- --exclude ".git/|.idea/|.pyc$" \
74
76
  --check-only \
77
+ --exclude ".git/|.idea/|.pyc$" \
75
78
  --new-line-marker linux \
76
79
  --normalize-new-line-markers \
77
80
  foo.txt my_project/
@@ -93,20 +96,21 @@ The regular expression is evaluated on the path of each file.
93
96
 
94
97
  * `--add-new-line-marker-at-end-of-file` -- Add missing new line marker at end of each file.
95
98
  * `--remove-new-line-marker-from-end-of-file` -- Remove all new line marker(s) from the end of each file.
96
- This option is ignored when `--add-new-line-marker-at-end-of-file` is used.
97
- Empty lines at the end of the file are removed.
99
+ This option cannot be used in combination with `--add-new-line-marker-at-end-of-file`.
100
+ Empty lines at the end of the file are removed, i.e., this option implies `--remove-trailing-empty-lines`
101
+ option.
98
102
  * `--normalize-new-line-markers` -- Make new line markers consistent in each file
99
- by replacing `\\r\\n`, `\\n`, and `\r` with a consistent new line marker.
103
+ by replacing `\r\n`, `\n`, and `\r` with a consistent new line marker.
100
104
  * `--remove-trailing-whitespace` -- Remove whitespace at the end of each line.
101
105
  * `--remove-trailing-empty-lines` -- Remove empty lines at the end of each file.
102
- * `--new-line-marker=MARKER` -- This option specifies what new line marker to use.
103
- `MARKER` must be one of the following:
106
+ * `--new-line-marker=MARKER` -- This option specifies what new line marker to when
107
+ adding or replacing new line markers. `MARKER` must be one of the following:
104
108
  * `auto` -- Use new line marker that is the most common in each individual file.
105
109
  If no new line marker is present in the file, Linux `\n` is used.
106
110
  This is the default option.
107
- * `linux` -- Use Linux new line marker `\\n`.
108
- * `mac` -- Use Mac new line marker `\\r`.
109
- * `windows` -- Use Windows new line marker `\\r\\n`.
111
+ * `linux` -- Use Linux new line marker `\n`.
112
+ * `mac` -- Use Mac new line marker `\r`.
113
+ * `windows` -- Use Windows new line marker `\r\n`.
110
114
  * `--encoding` -- Text encoding for both reading and writing files. Default encoding is `utf-8`.
111
115
  List of supported encodings can be found at
112
116
  https://docs.python.org/3/library/codecs.html#standard-encodings
@@ -161,7 +165,7 @@ Default value is `-1`.
161
165
 
162
166
  * `--normalize-non-standard-whitespace=MODE` -- Replace or remove
163
167
  non-standard whitespace characters (`\v` and `\f`). `MODE` must be one of the following:
164
- * `ignore` -- Leave `\v` and `f` as is. This is the default option.
168
+ * `ignore` -- Leave `\v` and `\f` as is. This is the default option.
165
169
  * `replace` -- Replace any occurrence of `\v` or `\f` with a single space.
166
170
  * `remove` -- Remove all occurrences of `\v` and `\f`
167
171
 
@@ -181,13 +185,7 @@ MIT
181
185
  brew install poetry
182
186
  ```
183
187
 
184
- 3) Create Python virtual environment with the correct Python version:
185
- ```shell
186
- make install-python
187
- make create-environment
188
- ```
189
-
190
- 4) Add the following lines to `.zshrc` or `.bash_profile` and restart the terminal:
188
+ 3) Add the following lines to `.zshrc` or `.bash_profile` and restart the terminal:
191
189
  ```shell
192
190
  # Pyenv settings
193
191
  export PYENV_ROOT="$HOME/.pyenv"
@@ -196,6 +194,12 @@ MIT
196
194
  eval "$(pyenv virtualenv-init -)"
197
195
  ```
198
196
 
197
+ 4) Create Python virtual environment with the correct Python version:
198
+ ```shell
199
+ make install-python
200
+ make create-environment
201
+ ```
202
+
199
203
  5) Install all dependencies
200
204
  ```shell
201
205
  make install-dependecies
@@ -30,7 +30,7 @@ second time (with the same parameters) has no effect.
30
30
  pip install whitespace-format
31
31
  ```
32
32
 
33
- Installation requires Python 3.7.5 or higher.
33
+ Installation requires Python 3.8.0 or higher.
34
34
 
35
35
  ## Usage
36
36
 
@@ -42,17 +42,18 @@ whitespace-format \
42
42
  --normalize-new-line-markers \
43
43
  foo.txt my_project/
44
44
  ```
45
- The command above formats `foo.txt` and all files contained `my_project/` and
46
- its subdirectories. Files that contain `.git/` or `.idea/` in their (relative)
47
- path are excluded. For example, files in `my_project/.git/` and files in
48
- `my_project/.idea/` are excluded. Likewise, files ending with `*.pyc` are
49
- excluded.
50
-
51
- If you want only know if any changes **would be** made, add `--check-only` option:
45
+ The command above formats `foo.txt` and all files contained in `my_project/`
46
+ directory and its subdirectories. Files that contain `.git/` or `.idea/` in
47
+ their (relative) path are excluded. For example, files in `my_project/.git/`
48
+ and files in `my_project/.idea/` are excluded. Likewise, files ending with
49
+ `*.pyc` are excluded.
50
+
51
+ If you want to know only if any changes **would be** made, add `--check-only`
52
+ option:
52
53
  ```shell
53
54
  whitespace-format \
54
- --exclude ".git/|.idea/|.pyc$" \
55
55
  --check-only \
56
+ --exclude ".git/|.idea/|.pyc$" \
56
57
  --new-line-marker linux \
57
58
  --normalize-new-line-markers \
58
59
  foo.txt my_project/
@@ -74,20 +75,21 @@ The regular expression is evaluated on the path of each file.
74
75
 
75
76
  * `--add-new-line-marker-at-end-of-file` -- Add missing new line marker at end of each file.
76
77
  * `--remove-new-line-marker-from-end-of-file` -- Remove all new line marker(s) from the end of each file.
77
- This option is ignored when `--add-new-line-marker-at-end-of-file` is used.
78
- Empty lines at the end of the file are removed.
78
+ This option cannot be used in combination with `--add-new-line-marker-at-end-of-file`.
79
+ Empty lines at the end of the file are removed, i.e., this option implies `--remove-trailing-empty-lines`
80
+ option.
79
81
  * `--normalize-new-line-markers` -- Make new line markers consistent in each file
80
- by replacing `\\r\\n`, `\\n`, and `\r` with a consistent new line marker.
82
+ by replacing `\r\n`, `\n`, and `\r` with a consistent new line marker.
81
83
  * `--remove-trailing-whitespace` -- Remove whitespace at the end of each line.
82
84
  * `--remove-trailing-empty-lines` -- Remove empty lines at the end of each file.
83
- * `--new-line-marker=MARKER` -- This option specifies what new line marker to use.
84
- `MARKER` must be one of the following:
85
+ * `--new-line-marker=MARKER` -- This option specifies what new line marker to when
86
+ adding or replacing new line markers. `MARKER` must be one of the following:
85
87
  * `auto` -- Use new line marker that is the most common in each individual file.
86
88
  If no new line marker is present in the file, Linux `\n` is used.
87
89
  This is the default option.
88
- * `linux` -- Use Linux new line marker `\\n`.
89
- * `mac` -- Use Mac new line marker `\\r`.
90
- * `windows` -- Use Windows new line marker `\\r\\n`.
90
+ * `linux` -- Use Linux new line marker `\n`.
91
+ * `mac` -- Use Mac new line marker `\r`.
92
+ * `windows` -- Use Windows new line marker `\r\n`.
91
93
  * `--encoding` -- Text encoding for both reading and writing files. Default encoding is `utf-8`.
92
94
  List of supported encodings can be found at
93
95
  https://docs.python.org/3/library/codecs.html#standard-encodings
@@ -142,7 +144,7 @@ Default value is `-1`.
142
144
 
143
145
  * `--normalize-non-standard-whitespace=MODE` -- Replace or remove
144
146
  non-standard whitespace characters (`\v` and `\f`). `MODE` must be one of the following:
145
- * `ignore` -- Leave `\v` and `f` as is. This is the default option.
147
+ * `ignore` -- Leave `\v` and `\f` as is. This is the default option.
146
148
  * `replace` -- Replace any occurrence of `\v` or `\f` with a single space.
147
149
  * `remove` -- Remove all occurrences of `\v` and `\f`
148
150
 
@@ -162,13 +164,7 @@ MIT
162
164
  brew install poetry
163
165
  ```
164
166
 
165
- 3) Create Python virtual environment with the correct Python version:
166
- ```shell
167
- make install-python
168
- make create-environment
169
- ```
170
-
171
- 4) Add the following lines to `.zshrc` or `.bash_profile` and restart the terminal:
167
+ 3) Add the following lines to `.zshrc` or `.bash_profile` and restart the terminal:
172
168
  ```shell
173
169
  # Pyenv settings
174
170
  export PYENV_ROOT="$HOME/.pyenv"
@@ -177,6 +173,12 @@ MIT
177
173
  eval "$(pyenv virtualenv-init -)"
178
174
  ```
179
175
 
176
+ 4) Create Python virtual environment with the correct Python version:
177
+ ```shell
178
+ make install-python
179
+ make create-environment
180
+ ```
181
+
180
182
  5) Install all dependencies
181
183
  ```shell
182
184
  make install-dependecies
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "whitespace-format"
3
- version = "0.0.4"
3
+ version = "0.0.6"
4
4
  description = "Linter and formatter for source code files and text files"
5
5
  license = "MIT"
6
6
  authors = ["David Pal <davidko.pal@gmail.com>"]
@@ -17,18 +17,18 @@ classifiers = [
17
17
  whitespace-format = "whitespace_format:main"
18
18
 
19
19
  [tool.poetry.dependencies]
20
- python = "^3.7.2"
20
+ python = "^3.8.0"
21
21
 
22
22
  [tool.poetry.dev-dependencies]
23
- black = "^23.3.0"
23
+ black = "^23.12.1"
24
24
  coverage = "^7.2.4"
25
25
  flake8 = "^5.0.4"
26
- flake8-absolute-import = "^1.0.0.1"
27
- isort = {extras = ["colors"], version = "^5.11.5"}
28
- mypy = "^1.4.1"
26
+ flake8-absolute-import = "^1.0.0.2"
27
+ isort = {extras = ["colors"], version = "^5.13.2"}
28
+ mypy = "^1.13.0"
29
29
  pydocstyle = {extras = ["toml"], version = "^6.3.0"}
30
- pytest = "^7.4.1"
31
- pylint = "^2.17.5"
30
+ pytest = "^8.3.4"
31
+ pylint = "^2.17.7"
32
32
  pylint-quotes = "^0.2.3"
33
33
 
34
34
  [build-system]