Skip to content

New regressions with black 24.4.2 #60

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

Closed
penguinpee opened this issue Jul 25, 2024 · 3 comments
Closed

New regressions with black 24.4.2 #60

penguinpee opened this issue Jul 25, 2024 · 3 comments

Comments

@penguinpee
Copy link

I've applied #59 as a patch on top of 2.2.0. That fixed the two failures reported in #57 for black 24.3.0. However, with 24.4.2 two more tests fail:

=================================== FAILURES ===================================
__________________________ test_load_config_defaults ___________________________
config = {'fast': False, 'line_length': 88, 'preview': False, 'pyi': False, ...}
    def test_load_config_defaults(config):
        config = load_config(str(fixtures_dir / "example.py"), config)
    
>       assert config == {
            "line_length": 88,
            "target_version": set(),
            "pyi": False,
            "fast": False,
            "skip_magic_trailing_comma": False,
            "skip_string_normalization": False,
            "preview": False,
        }
E       AssertionError: assert {'line_length': 88, 'fast': False, 'pyi': False, 'skip_string_normalization': False, 'skip_magic_trailing_comma': False, 'target_version': {<TargetVersion.PY310: 10>, <TargetVersion.PY38: 8>, <TargetVersion.PY311: 11>, <TargetVersion.PY39: 9>}, 'preview': False} == {'line_length': 88, 'target_version': set(), 'pyi': False, 'fast': False, 'skip_magic_trailing_comma': False, 'skip_string_normalization': False, 'preview': False}
E         Common items:
E         {'fast': False,
E          'line_length': 88,
E          'preview': False,
E          'pyi': False,
E          'skip_magic_trailing_comma': False,
E          'skip_string_normalization': False}
E         Differing items:
E         {'target_version': {<TargetVersion.PY310: 10>, <TargetVersion.PY38: 8>, <TargetVersion.PY311: 11>, <TargetVersion.PY39: 9>}} != {'target_version': set()}
E         Full diff:
E           {
E            'fast': False,
E            'line_length': 88,
E            'preview': False,
E            'pyi': False,
E            'skip_magic_trailing_comma': False,
E            'skip_string_normalization': False,
E         -  'target_version': set(),
E         +  'target_version': {<TargetVersion.PY39: 9>,
E         +                     <TargetVersion.PY310: 10>,
E         +                     <TargetVersion.PY38: 8>,
E         +                     <TargetVersion.PY311: 11>},
E           }
tests/test_plugin.py:282: AssertionError
______________________ test_load_config_with_skip_options ______________________
config_with_skip_options = <pylsp.config.config.Config object at 0x7fe9d05d3290>
    def test_load_config_with_skip_options(config_with_skip_options):
        config = load_config(
            str(fixtures_dir / "skip_options" / "example.py"), config_with_skip_options
        )
    
>       assert config == {
            "line_length": 88,
            "target_version": set(),
            "pyi": False,
            "fast": False,
            "skip_magic_trailing_comma": True,
            "skip_string_normalization": True,
            "preview": False,
        }
E       AssertionError: assert {'line_length': 88, 'fast': False, 'pyi': False, 'skip_string_normalization': True, 'skip_magic_trailing_comma': True, 'target_version': {<TargetVersion.PY310: 10>, <TargetVersion.PY38: 8>, <TargetVersion.PY311: 11>, <TargetVersion.PY39: 9>}, 'preview': False} == {'line_length': 88, 'target_version': set(), 'pyi': False, 'fast': False, 'skip_magic_trailing_comma': True, 'skip_string_normalization': True, 'preview': False}
E         Common items:
E         {'fast': False,
E          'line_length': 88,
E          'preview': False,
E          'pyi': False,
E          'skip_magic_trailing_comma': True,
E          'skip_string_normalization': True}
E         Differing items:
E         {'target_version': {<TargetVersion.PY310: 10>, <TargetVersion.PY38: 8>, <TargetVersion.PY311: 11>, <TargetVersion.PY39: 9>}} != {'target_version': set()}
E         Full diff:
E           {
E            'fast': False,
E            'line_length': 88,
E            'preview': False,
E            'pyi': False,
E            'skip_magic_trailing_comma': True,
E            'skip_string_normalization': True,
E         -  'target_version': set(),
E         +  'target_version': {<TargetVersion.PY39: 9>,
E         +                     <TargetVersion.PY310: 10>,
E         +                     <TargetVersion.PY38: 8>,
E         +                     <TargetVersion.PY311: 11>},
E           }
tests/test_plugin.py:298: AssertionError
@penguinpee
Copy link
Author

I'll see if I can come up with a patch.

@penguinpee
Copy link
Author

This appears to be #55, which is fixed by #56. I'll apply that as well.

@penguinpee
Copy link
Author

Yep. With both patches applied all tests pass again.

@penguinpee penguinpee closed this as not planned Won't fix, can't repro, duplicate, stale Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant