Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

Commit de09dfe

Browse files
committed
Drop pep257 entry point.
1 parent d0d5bec commit de09dfe

File tree

3 files changed

+6
-29
lines changed

3 files changed

+6
-29
lines changed

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
entry_points={
3535
'console_scripts': [
3636
'pydocstyle = pydocstyle.cli:main',
37-
'pep257 = pydocstyle.cli:main_pep257',
3837
],
3938
},
4039
)

src/pydocstyle/cli.py

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class ReturnCode(object):
1717
invalid_options = 2
1818

1919

20-
def run_pydocstyle(use_pep257=False):
20+
def run_pydocstyle():
2121
log.setLevel(logging.DEBUG)
2222
conf = ConfigurationParser()
2323
setup_stream_handlers(conf.get_default_run_configuration())
@@ -32,12 +32,6 @@ def run_pydocstyle(use_pep257=False):
3232
# Reset the logger according to the command line arguments
3333
setup_stream_handlers(run_conf)
3434

35-
if use_pep257:
36-
log.warning("Deprecation Warning:\n"
37-
"pep257 has been renamed to pydocstyle and the use of the "
38-
"pep257 executable is deprecated and will be removed in "
39-
"the next major version. Please use `pydocstyle` instead.")
40-
4135
log.debug("starting in debug mode.")
4236

4337
Error.explain = run_conf.explain
@@ -64,23 +58,14 @@ def run_pydocstyle(use_pep257=False):
6458
return exit_code
6559

6660

67-
def main(use_pep257=False):
68-
"""Run pydocstyle as a script.
69-
70-
`use_pep257` is True if the script was invoked with the deprecated script
71-
name `pep257`, in which case a deprecation warning will be printed.
72-
73-
"""
61+
def main():
62+
"""Run pydocstyle as a script."""
7463
try:
75-
sys.exit(run_pydocstyle(use_pep257))
64+
sys.exit(run_pydocstyle())
7665
except KeyboardInterrupt:
7766
pass
7867

7968

80-
def main_pep257():
81-
main(use_pep257=True)
82-
83-
8469
def setup_stream_handlers(conf):
8570
"""Setup logging stream handlers according to the options."""
8671
class StdoutFilter(logging.Filter):

src/tests/test_integration.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ def install_package(request):
108108
subprocess.check_call(shlex.split(uninstall_cmd), cwd=cwd)
109109

110110

111-
@pytest.yield_fixture(scope="function", params=('pydocstyle', 'pep257'))
111+
@pytest.yield_fixture(scope="function")
112112
def env(request):
113-
with SandboxEnv(request.param) as test_env:
113+
with SandboxEnv() as test_env:
114114
yield test_env
115115

116116

@@ -879,10 +879,3 @@ def foo():
879879
_, _, code = env.invoke()
880880

881881
assert code == 0
882-
883-
884-
def test_pep257_entry_point():
885-
with SandboxEnv('pep257') as env:
886-
_, err, code = env.invoke()
887-
assert code == 0
888-
assert 'Deprecation Warning' in err, err

0 commit comments

Comments
 (0)