Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove broken generate-man option #6126

Merged
merged 2 commits into from
Apr 2, 2022

Conversation

DanielNoord
Copy link
Collaborator

@DanielNoord DanielNoord commented Apr 2, 2022

  • Add yourself to CONTRIBUTORS if you are a new contributor.
  • Add a ChangeLog entry describing what your PR does.
  • If it's a new feature, or an important bug fix, add a What's New entry in
    doc/whatsnew/<current release.rst>.
  • Write a good description on what the PR does.

Type of Changes

Type
🐛 Bug fix

Description

Turns out this was broken, probably for quite some time. Since nobody opened an issue about this and nobody seems to sue this anymore, I think this can be considered dead code. It wasn't tested anyway.
Closes #5283
Closes #1887

When you try to use this on main:

pylint --generate-man
Traceback (most recent call last):
  File "/Users/daniel/.pyenv/versions/pylint-3.10.0/bin/pylint", line 33, in <module>
    sys.exit(load_entry_point('pylint', 'console_scripts', 'pylint')())
  File "/Users/daniel/DocumentenLaptop/Programming/Github/pylint/pylint/__init__.py", line 22, in run_pylint
    PylintRun(argv or sys.argv[1:])
  File "/Users/daniel/DocumentenLaptop/Programming/Github/pylint/pylint/lint/run.py", line 350, in __init__
    args = _config_initialization(
  File "/Users/daniel/DocumentenLaptop/Programming/Github/pylint/pylint/config/config_initialization.py", line 73, in _config_initialization
    parsed_args_list = linter.load_command_line_configuration(args_list)
  File "/Users/daniel/DocumentenLaptop/Programming/Github/pylint/pylint/config/option_manager_mixin.py", line 338, in load_command_line_configuration
    (options, args) = self.cmdline_parser.parse_args(args=args)
  File "/Users/daniel/.pyenv/versions/3.10.0/lib/python3.10/optparse.py", line 1387, in parse_args
    stop = self._process_args(largs, rargs, values)
  File "/Users/daniel/.pyenv/versions/3.10.0/lib/python3.10/optparse.py", line 1427, in _process_args
    self._process_long_opt(rargs, values)
  File "/Users/daniel/.pyenv/versions/3.10.0/lib/python3.10/optparse.py", line 1501, in _process_long_opt
    option.process(opt, value, values, self)
  File "/Users/daniel/DocumentenLaptop/Programming/Github/pylint/pylint/config/option.py", line 203, in process
    return self.take_action(self.action, self.dest, opt, value, values, parser)
  File "/Users/daniel/.pyenv/versions/3.10.0/lib/python3.10/optparse.py", line 805, in take_action
    self.callback(self, opt, value, parser, *args, **kwargs)
  File "/Users/daniel/DocumentenLaptop/Programming/Github/pylint/pylint/lint/run.py", line 442, in cb_generate_manpage
    self.linter.generate_manpage(__pkginfo__)
  File "/Users/daniel/DocumentenLaptop/Programming/Github/pylint/pylint/config/option_manager_mixin.py", line 230, in generate_manpage
    formatter.format_head(self.cmdline_parser, pkginfo, section),
  File "/Users/daniel/DocumentenLaptop/Programming/Github/pylint/pylint/config/man_help_formatter.py", line 46, in format_head
    short_desc = self.format_short_description(pgm, pkginfo.description)
AttributeError: module 'pylint.__pkginfo__' has no attribute 'description'

@DanielNoord DanielNoord added the Maintenance Discussion or action around maintaining pylint or the dev workflow label Apr 2, 2022
@DanielNoord DanielNoord added this to the 2.14.0 milestone Apr 2, 2022
@coveralls
Copy link

coveralls commented Apr 2, 2022

Pull Request Test Coverage Report for Build 2081736358

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.3%) to 94.537%

Totals Coverage Status
Change from base Build 2081637560: 0.3%
Covered Lines: 15505
Relevant Lines: 16401

💛 - Coveralls

ChangeLog Show resolved Hide resolved
doc/whatsnew/2.14.rst Show resolved Hide resolved
Co-authored-by: Pierre Sassoulas <[email protected]>
Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really like removing unused code.

@Pierre-Sassoulas Pierre-Sassoulas merged commit 968b513 into pylint-dev:main Apr 2, 2022
@DanielNoord DanielNoord deleted the manpage branch April 2, 2022 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Maintenance Discussion or action around maintaining pylint or the dev workflow
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generated man page for pylint are untested and unused Add the man page generation back in
3 participants