mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-13 16:14:18 +00:00
fix links in code
This commit is contained in:
parent
fe0e2495ce
commit
3b57778160
3 changed files with 9 additions and 9 deletions
|
|
@ -29,7 +29,7 @@ SERIAL_RETRY_ERRNOS = {
|
||||||
# > In those cases, we should replace the customized Queue Report
|
# > In those cases, we should replace the customized Queue Report
|
||||||
# > class with pep8's StandardReport class to ensure users don't run
|
# > class with pep8's StandardReport class to ensure users don't run
|
||||||
# > into this problem.
|
# > into this problem.
|
||||||
# > (See also: https://gitlab.com/pycqa/flake8/issues/74)
|
# > (See also: https://github.com/pycqa/flake8/issues/117)
|
||||||
errno.ENOSPC,
|
errno.ENOSPC,
|
||||||
# NOTE(sigmavirus24): When adding to this list, include the reasoning
|
# NOTE(sigmavirus24): When adding to this list, include the reasoning
|
||||||
# on the lines before the error code and always append your error
|
# on the lines before the error code and always append your error
|
||||||
|
|
@ -305,7 +305,7 @@ class Manager:
|
||||||
or whether to run them in serial.
|
or whether to run them in serial.
|
||||||
|
|
||||||
If running the checks in parallel causes a problem (e.g.,
|
If running the checks in parallel causes a problem (e.g.,
|
||||||
https://gitlab.com/pycqa/flake8/issues/74) this also implements
|
https://github.com/pycqa/flake8/issues/117) this also implements
|
||||||
fallback to serial processing.
|
fallback to serial processing.
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
|
|
@ -444,7 +444,7 @@ class FileChecker:
|
||||||
# least.
|
# least.
|
||||||
column_offset = 1
|
column_offset = 1
|
||||||
row_offset = 0
|
row_offset = 0
|
||||||
# See also: https://gitlab.com/pycqa/flake8/issues/237
|
# See also: https://github.com/pycqa/flake8/issues/169
|
||||||
physical_line = token[-1]
|
physical_line = token[-1]
|
||||||
|
|
||||||
# NOTE(sigmavirus24): Not all "tokens" have a string as the last
|
# NOTE(sigmavirus24): Not all "tokens" have a string as the last
|
||||||
|
|
@ -454,7 +454,7 @@ class FileChecker:
|
||||||
# NOTE(sigmavirus24): SyntaxErrors also don't exactly have a
|
# NOTE(sigmavirus24): SyntaxErrors also don't exactly have a
|
||||||
# "physical" line so much as what was accumulated by the point
|
# "physical" line so much as what was accumulated by the point
|
||||||
# tokenizing failed.
|
# tokenizing failed.
|
||||||
# See also: https://gitlab.com/pycqa/flake8/issues/237
|
# See also: https://github.com/pycqa/flake8/issues/169
|
||||||
lines = physical_line.rstrip("\n").split("\n")
|
lines = physical_line.rstrip("\n").split("\n")
|
||||||
row_offset = len(lines) - 1
|
row_offset = len(lines) - 1
|
||||||
logical_line = lines[0]
|
logical_line = lines[0]
|
||||||
|
|
@ -661,8 +661,8 @@ def calculate_pool_chunksize(num_checkers, num_jobs):
|
||||||
- For chunksize, see: https://docs.python.org/3/library/multiprocessing.html#multiprocessing.pool.Pool.imap # noqa
|
- For chunksize, see: https://docs.python.org/3/library/multiprocessing.html#multiprocessing.pool.Pool.imap # noqa
|
||||||
- This formula, while not perfect, aims to give each worker two batches of
|
- This formula, while not perfect, aims to give each worker two batches of
|
||||||
work.
|
work.
|
||||||
- See: https://gitlab.com/pycqa/flake8/merge_requests/156#note_18878876
|
- See: https://github.com/pycqa/flake8/issues/829#note_18878876
|
||||||
- See: https://gitlab.com/pycqa/flake8/issues/265
|
- See: https://github.com/pycqa/flake8/issues/197
|
||||||
"""
|
"""
|
||||||
return max(num_checkers // (num_jobs * 2), 1)
|
return max(num_checkers // (num_jobs * 2), 1)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -207,7 +207,7 @@ def test_bug_report_successful(capsys):
|
||||||
|
|
||||||
|
|
||||||
def test_specific_noqa_does_not_clobber_pycodestyle_noqa(tmpdir, capsys):
|
def test_specific_noqa_does_not_clobber_pycodestyle_noqa(tmpdir, capsys):
|
||||||
"""See https://gitlab.com/pycqa/flake8/issues/552."""
|
"""See https://github.com/pycqa/flake8/issues/1104."""
|
||||||
with tmpdir.as_cwd():
|
with tmpdir.as_cwd():
|
||||||
tmpdir.join('t.py').write("test = ('ABC' == None) # noqa: E501\n")
|
tmpdir.join('t.py').write("test = ('ABC' == None) # noqa: E501\n")
|
||||||
_call_main(['t.py'], retv=1)
|
_call_main(['t.py'], retv=1)
|
||||||
|
|
@ -219,7 +219,7 @@ t.py:1:15: E711 comparison to None should be 'if cond is None:'
|
||||||
|
|
||||||
|
|
||||||
def test_specific_noqa_on_line_with_continuation(tmpdir, capsys):
|
def test_specific_noqa_on_line_with_continuation(tmpdir, capsys):
|
||||||
"""See https://gitlab.com/pycqa/flake8/issues/375."""
|
"""See https://github.com/pycqa/flake8/issues/621."""
|
||||||
t_py_src = '''\
|
t_py_src = '''\
|
||||||
from os \\
|
from os \\
|
||||||
import path # noqa: F401
|
import path # noqa: F401
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ from flake8 import checker
|
||||||
def test_run_ast_checks_handles_SyntaxErrors(FileProcessor): # noqa: N802,N803
|
def test_run_ast_checks_handles_SyntaxErrors(FileProcessor): # noqa: N802,N803
|
||||||
"""Stress our SyntaxError handling.
|
"""Stress our SyntaxError handling.
|
||||||
|
|
||||||
Related to: https://gitlab.com/pycqa/flake8/issues/237
|
Related to: https://github.com/pycqa/flake8/issues/169
|
||||||
"""
|
"""
|
||||||
processor = mock.Mock(lines=[])
|
processor = mock.Mock(lines=[])
|
||||||
FileProcessor.return_value = processor
|
FileProcessor.return_value = processor
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue