mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-09 14:24:17 +00:00
Support hyphens within a flake8 custom plugin code
Prior to this change, a code had to be formatted as a series of characters followed by a series of numbers. This change updates the format to require the first character to be a letter, followed by any number of letters, numbers, or hyphens.
This commit is contained in:
parent
94ed800b2a
commit
722bd6a9e5
2 changed files with 6 additions and 3 deletions
|
|
@ -99,6 +99,11 @@ def test_parse_comma_separated_list(value, expected):
|
|||
"f.py: ABC123",
|
||||
[("f.py", ["ABC123"])],
|
||||
),
|
||||
# hyphens are allowed
|
||||
(
|
||||
"f.py: COMPANY-NAME-SPACE-123,COMPANY-NAME-SPACE-321",
|
||||
[("f.py", ["COMPANY-NAME-SPACE-123", "COMPANY-NAME-SPACE-321"])],
|
||||
),
|
||||
),
|
||||
)
|
||||
def test_parse_files_to_codes_mapping(value, expected):
|
||||
|
|
@ -118,8 +123,6 @@ def test_parse_files_to_codes_mapping(value, expected):
|
|||
"f.py:E,g.py"
|
||||
# colon while looking for codes
|
||||
"f.py::",
|
||||
# no separator between
|
||||
"f.py:E1F1",
|
||||
),
|
||||
)
|
||||
def test_invalid_file_list(value):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue