From ba4e7eeee64a01f45297bcf6d03fe155b611eaff Mon Sep 17 00:00:00 2001 From: sobolevn Date: Sun, 22 Dec 2024 23:11:03 +0300 Subject: [PATCH] Fix typoes --- CHANGELOG.md | 10 +++++----- CONTRIBUTING.md | 2 +- docs/pages/usage/formatter.rst | 2 +- .../test_raise/test_raise_from_itself_violation.py | 2 +- tests/whitelist.txt | 1 + wemake_python_styleguide/formatter.py | 2 +- wemake_python_styleguide/logic/complexity/overuses.py | 2 +- wemake_python_styleguide/logic/tree/annotations.py | 2 +- wemake_python_styleguide/options/defaults.py | 2 +- wemake_python_styleguide/violations/oop.py | 2 +- .../visitors/tokenize/primitives.py | 2 +- 11 files changed, 15 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc06dbaa2..37376b948 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ Semantic versioning in our case means: - Minor releases do bring new features and configuration options. New violations can be added. Code that passes on `x.0.y` might not pass on `x.1.y` release because of the new checks. -- Major releases inidicate significant milestones or serious breaking changes. +- Major releases indicate significant milestones or serious breaking changes. There are no major releases right now: we are still at `0.x.y` version. But, in the future we might change the configuration names/logic, change the client facing API, change code conventions significantly, etc. @@ -117,7 +117,7 @@ Semantic versioning in our case means: - Fixes `WPS210` to not count nested local variables in nested scopes #3108 - Fixes `IterableUnpackingViolation` with generic types and `TypeVarTuple` - Fixes `WPS469` detecting incorrect names of raised exceptions, #3109 -- Fixes unnormalized pathes in formatter output +- Fixes unnormalized paths in formatter output - Fixes `WPS434` to allow reassignment in a form of `x = [y, *x]` - Fixes `WPS221` to ignore PEP695's `TypeAlias` from line complexity checks - Fixes `WPS474` to only count import collisions in the same context, #2962 @@ -194,7 +194,7 @@ In the future this project will be migrated to be used together with `ruff`. - Fixes `ForbiddenInlineIgnoreViolation` config parsing. #2590 - Fixes `WrongEmptyLinesCountViolation` for func definitions with ellipsis. #2847 -- Fixes `WrongEmptyLinesCountViolation` for multiline implicit string concatination. #2787 +- Fixes `WrongEmptyLinesCountViolation` for multiline implicit string concatenation. #2787 - Fixes `ObjectInBaseClassesListViolation`, `UnpythonicGetterSetterViolation`, `ImplicitInConditionViolation`, `RedundantSubscriptViolation`, `TooLongCompareViolation` to include better error details @@ -440,7 +440,7 @@ In the future this project will be migrated to be used together with `ruff`. ### Misc -- Updates lots of dependenices +- Updates lots of dependencies - Fixed documentation for TooManyPublicAttributesViolation - Updated isort config - Introduce helper script to check @@ -1292,7 +1292,7 @@ for tests. We also now covering more cases and testing violation texts. - Refactoring: removed duplicate logic inside `logics/filenames.py` - Improves tests: now testing almost all violations inside `noqa.py` - Improves tests: now testing violations text -- Improves tests: now all common patters live in related `conftest.py` +- Improves tests: now all common patterns live in related `conftest.py` - Improves docs: now all configuration options are listed in the violations diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fb4a2e286..67490627d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -130,7 +130,7 @@ And then you can use them: ```bash # codespell: -codespell -w wemake_python_styleguide tests docs scripts styles *.md +codespell -w wemake_python_styleguide tests docs scripts styles *.md --ignore-words ./tests/whitelist.txt # flake8-spellcheck: flake8 --whitelist ./tests/whitelist.txt . diff --git a/docs/pages/usage/formatter.rst b/docs/pages/usage/formatter.rst index df8c2fd4a..7fd22448a 100644 --- a/docs/pages/usage/formatter.rst +++ b/docs/pages/usage/formatter.rst @@ -125,7 +125,7 @@ We do not include ``show-violation-links`` in our default configuration. .. rubric:: Disabling colors and text highlight Set ``NO_COLOR=1`` environment variable -to completely disable all text highligt and colors +to completely disable all text highlight and colors in ``wemake`` formatter. See https://no-color.org for more information about ``NO_COLOR``. diff --git a/tests/test_visitors/test_ast/test_keywords/test_raise/test_raise_from_itself_violation.py b/tests/test_visitors/test_ast/test_keywords/test_raise/test_raise_from_itself_violation.py index 0da14745b..205d1a76b 100644 --- a/tests/test_visitors/test_ast/test_keywords/test_raise/test_raise_from_itself_violation.py +++ b/tests/test_visitors/test_ast/test_keywords/test_raise/test_raise_from_itself_violation.py @@ -14,7 +14,7 @@ def raise_from_itself(): try: print('test') - except Exeception as ex: + except Exception as ex: raise ex from ex """ diff --git a/tests/whitelist.txt b/tests/whitelist.txt index ecd2215cc..000b4a4ab 100644 --- a/tests/whitelist.txt +++ b/tests/whitelist.txt @@ -305,6 +305,7 @@ notequals notequals num Num +NotIn numpy octdigits OOP diff --git a/wemake_python_styleguide/formatter.py b/wemake_python_styleguide/formatter.py index df7cb9296..d0a6f55a3 100644 --- a/wemake_python_styleguide/formatter.py +++ b/wemake_python_styleguide/formatter.py @@ -53,7 +53,7 @@ class WemakeFormatter(BaseFormatter): # noqa: WPS214 """ - We need to format our style :term:`violations ` beatifully. + We need to format our style :term:`violations ` beautifully. The default formatter does not allow us to do that. What things do we miss? diff --git a/wemake_python_styleguide/logic/complexity/overuses.py b/wemake_python_styleguide/logic/complexity/overuses.py index 43182442e..26b1b12e7 100644 --- a/wemake_python_styleguide/logic/complexity/overuses.py +++ b/wemake_python_styleguide/logic/complexity/overuses.py @@ -35,7 +35,7 @@ def is_decorator(node: ast.AST) -> bool: """ Detects if node is used as a decorator. - We use this predicates because decorators can be used miltiple times. + We use this predicates because decorators can be used multiple times. Like ``@auth_required(login_url=LOGIN_URL)`` and similar. """ parent = walk.get_closest_parent(node, FunctionNodes) diff --git a/wemake_python_styleguide/logic/tree/annotations.py b/wemake_python_styleguide/logic/tree/annotations.py index 5ac62cfbf..fcb9f74a6 100644 --- a/wemake_python_styleguide/logic/tree/annotations.py +++ b/wemake_python_styleguide/logic/tree/annotations.py @@ -22,7 +22,7 @@ def is_annotation(node: ast.AST) -> bool: """ Detects if node is an annotation. Or a part of it. - We use this predicate to allow all types of repetetive + We use this predicate to allow all types of repetitive function and instance annotations. """ if not ( diff --git a/wemake_python_styleguide/options/defaults.py b/wemake_python_styleguide/options/defaults.py index fc488cb1e..aae52e1ba 100644 --- a/wemake_python_styleguide/options/defaults.py +++ b/wemake_python_styleguide/options/defaults.py @@ -34,7 +34,7 @@ NESTED_CLASSES_WHITELIST: Final = ( 'Meta', # django forms, models, drf, etc 'Params', # factoryboy specific - 'Config', # pydantic spesific + 'Config', # pydantic specific ) #: Domain names that are removed from variable names' blacklist. diff --git a/wemake_python_styleguide/violations/oop.py b/wemake_python_styleguide/violations/oop.py index b9b3093f4..d587786d9 100644 --- a/wemake_python_styleguide/violations/oop.py +++ b/wemake_python_styleguide/violations/oop.py @@ -726,7 +726,7 @@ class User: def __init__(self): self.login = lambda: ... - See als: + See also: https://docs.astral.sh/ruff/rules/lambda-assignment .. versionadded:: 1.0.0 diff --git a/wemake_python_styleguide/visitors/tokenize/primitives.py b/wemake_python_styleguide/visitors/tokenize/primitives.py index 2251c64b1..eeee439d6 100644 --- a/wemake_python_styleguide/visitors/tokenize/primitives.py +++ b/wemake_python_styleguide/visitors/tokenize/primitives.py @@ -168,7 +168,7 @@ class WrongStringTokenVisitor(BaseTokenVisitor): """Checks incorrect string tokens usages.""" def __init__(self, *args, **kwargs) -> None: - """Check string defitions.""" + """Check string definitions.""" super().__init__(*args, **kwargs) self._checker = _StringTokenChecker( self.file_tokens,