forked from pool/python-flake8-pyi
- Add set-tests-python-path.patch to fix tests inside osc build
environment, running the flake8 process with shell=True and forcing
the PYTHONPATH.
- Update to 23.1.2:
* Y011/Y014/Y015: Increase the maximum character length of literal
numbers in default values from 7 to 10, allowing hexadecimal
representation of 32-bit integers. Contributed by Avasam.
- 23.1.1
New error codes:
* Y052: Disallow default values in global or class namespaces where
the assignment does not have a type annotation. Stubs should be
explicit about the type of all variables in the stub; without type
annotations, the type checker is forced to make inferences, which
may have unpredictable consequences. Enum members are excluded
from this check, as are various special assignments such as
__all__ and __match_args__.
Other changes:
* Disallow numeric default values where len(str(default)) > 7. If a
function has a default value where the string representation is
greater than 7 characters, it is likely to be an implementation
detail or a constant that varies depending on the system you're
running on, such as sys.maxsize.
* Disallow str or bytes defaults where the default is >50 characters
long, for similar reasons.
* Allow ast.Attribute nodes as default values for a small number of
special cases, such as sys.maxsize and sys.executable.
* Fewer Y020 false positives are now emitted when encountering
default values in stub files.
- 23.1.0
Bugfixes:
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flake8-pyi?expand=0&rev=17
This commit is contained in:
@@ -1,3 +1,59 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 6 15:53:17 UTC 2023 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
- Add set-tests-python-path.patch to fix tests inside osc build
|
||||
environment, running the flake8 process with shell=True and forcing
|
||||
the PYTHONPATH.
|
||||
- Update to 23.1.2:
|
||||
* Y011/Y014/Y015: Increase the maximum character length of literal
|
||||
numbers in default values from 7 to 10, allowing hexadecimal
|
||||
representation of 32-bit integers. Contributed by Avasam.
|
||||
- 23.1.1
|
||||
New error codes:
|
||||
* Y052: Disallow default values in global or class namespaces where
|
||||
the assignment does not have a type annotation. Stubs should be
|
||||
explicit about the type of all variables in the stub; without type
|
||||
annotations, the type checker is forced to make inferences, which
|
||||
may have unpredictable consequences. Enum members are excluded
|
||||
from this check, as are various special assignments such as
|
||||
__all__ and __match_args__.
|
||||
Other changes:
|
||||
* Disallow numeric default values where len(str(default)) > 7. If a
|
||||
function has a default value where the string representation is
|
||||
greater than 7 characters, it is likely to be an implementation
|
||||
detail or a constant that varies depending on the system you're
|
||||
running on, such as sys.maxsize.
|
||||
* Disallow str or bytes defaults where the default is >50 characters
|
||||
long, for similar reasons.
|
||||
* Allow ast.Attribute nodes as default values for a small number of
|
||||
special cases, such as sys.maxsize and sys.executable.
|
||||
* Fewer Y020 false positives are now emitted when encountering
|
||||
default values in stub files.
|
||||
- 23.1.0
|
||||
Bugfixes:
|
||||
* Do not emit Y020 (quoted annotations) for strings in parameter defaults.
|
||||
* Fix checking of defaults for functions with positional-only parameters.
|
||||
Other changes:
|
||||
* Modify Y036 so that _typeshed.Unused is allowed as an annotation
|
||||
for parameters in __(a)exit__ methods. Contributed by Avasam
|
||||
* Several changes have been made to error codes relating to imports:
|
||||
- The Y027 error code has been removed.
|
||||
- All errors that used to result in Y027 being emitted now result
|
||||
in Y022 being emitted instead.
|
||||
- Some errors that used to result in Y023 being emitted now result
|
||||
in Y022 being emitted instead.
|
||||
- typing.Match and typing.Pattern have been added to the list of
|
||||
imports banned by Y022. Use re.Match and re.Pattern instead.
|
||||
* flake8-pyi no longer supports stub files that aim to support
|
||||
Python 2. If your stubs need to support Python 2, pin flake8-pyi
|
||||
to 22.11.0 or lower.
|
||||
* Y011, Y014 and Y015 have all been significantly relaxed. None,
|
||||
bools, ints, floats, complex numbers, strings and bytes are all
|
||||
now allowed as default values for parameter annotations or
|
||||
assignments.
|
||||
* Hatchling is now used as the build backend. This should have
|
||||
minimal, if any, user-facing impact.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 6 03:30:37 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user