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

Ignore Patterns option does not disable type checking. #3261

Closed
MinekPo1 opened this issue Apr 9, 2022 · 7 comments
Closed

Ignore Patterns option does not disable type checking. #3261

MinekPo1 opened this issue Apr 9, 2022 · 7 comments
Assignees
Labels
enhancement New feature or request fixed in next version (main) A fix has been implemented and will appear in an upcoming version

Comments

@MinekPo1
Copy link

MinekPo1 commented Apr 9, 2022

Issue Type: Bug

Behaviour

Expected vs. Actual

Expected: Issues from ignored files found by static type checkers and other linters are ignored.

Actual: Issues found by type checkers are still shown

Steps to reproduce:

  1. Create a file hidden.py:
# static type checker violation
b: int = "a"

# pep8 violation
def f(a = 1):
	pass
  1. Add hidden.py to ignored patterns

  2. Observe the pep8 violations disappear, but the static type checker errors remain.

Before adding to ignored patterns:
image

After:
image

Diagnostic data

  • Python version (& distribution if applicable, e.g. Anaconda): 3.10.4
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): WindowsStore
  • Value of the python.languageServer setting: Pylance
User Settings


defaultLS: {"defaultLSType":"Pylance"}

downloadLanguageServer: true

envFile: "<placeholder>"

venvPath: "<placeholder>"

venvFolders: "<placeholder>"

condaPath: "<placeholder>"

pipenvPath: "<placeholder>"

poetryPath: "<placeholder>"

languageServer: "Pylance"

linting
• enabled: true
• cwd: "<placeholder>"
• Flake8Args: "<placeholder>"
• flake8Enabled: true
• flake8Path: "<placeholder>"
• lintOnSave: true
• banditArgs: "<placeholder>"
• banditEnabled: false
• banditPath: "<placeholder>"
• mypyArgs: "<placeholder>"
• mypyEnabled: true
• mypyPath: "<placeholder>"
• pycodestyleArgs: "<placeholder>"
• pycodestyleEnabled: false
• pycodestylePath: "<placeholder>"
• prospectorArgs: "<placeholder>"
• prospectorEnabled: false
• prospectorPath: "<placeholder>"
• pydocstyleArgs: "<placeholder>"
• pydocstyleEnabled: false
• pydocstylePath: "<placeholder>"
• pylamaArgs: "<placeholder>"
• pylamaEnabled: false
• pylamaPath: "<placeholder>"
• pylintArgs: "<placeholder>"
• pylintPath: "<placeholder>"

sortImports
• args: "<placeholder>"
• path: "<placeholder>"

formatting
• autopep8Args: "<placeholder>"
• autopep8Path: "<placeholder>"
• provider: "black"
• blackArgs: "<placeholder>"
• blackPath: "<placeholder>"
• yapfArgs: "<placeholder>"
• yapfPath: "<placeholder>"

testing
• cwd: "<placeholder>"
• debugPort: 3000
• nosetestArgs: "<placeholder>"
• nosetestsEnabled: undefined
• nosetestPath: "<placeholder>"
• promptToConfigure: true
• pytestArgs: "<placeholder>"
• pytestEnabled: false
• pytestPath: "<placeholder>"
• unittestArgs: "<placeholder>"
• unittestEnabled: false
• autoTestDiscoverOnSaveEnabled: true

terminal
• activateEnvironment: true
• executeInFileDir: "<placeholder>"
• launchArgs: "<placeholder>"

experiments
• enabled: true
• optInto: []
• optOutFrom: []

tensorBoard
• logDirectory: "<placeholder>"

Extension version: 2022.4.1
VS Code version: Code 1.66.0 (e18005f0f1b33c29e81d732535d8c0e47cafb0b5, 2022-03-30T05:50:14.623Z)
OS version: Windows_NT x64 10.0.19044
Restricted Mode: No

System Info
Item Value
CPUs AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx (8 x 2100)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 5.94GB (0.42GB free)
Process Argv --enable-proposed-api genuitecllc.codetogether --crash-reporter-id 5b7ccd23-cdfb-4816-a20c-609972a06a82
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyl392:30443607
pythontb:30283811
pythonvspyt551:30345470
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
vscorecescf:30445987
pythondataviewer:30285071
vscod805cf:30301675
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
pythonvsnew555:30457759
vscscmwlcmt:30465135
cppdebug:30466689
pynewfile477:30463512

@karthiknadig karthiknadig self-assigned this Apr 11, 2022
@karthiknadig karthiknadig added bug Something isn't working and removed triage-needed labels Apr 11, 2022
@karthiknadig
Copy link
Member

@MinekPo1 Can you elaborate on what the ignore patterns are?

@MinekPo1
Copy link
Author

@karthiknadig sorry for not specifying in the original issue, as it seemed obvious to me.

I am referring to the Python>Linting>Ignored Patterns setting. I think that is correct but I'm on my phone right now and cannot verify.

The way I usually access the setting is by searching for Ignored Patterns and navigate to the python extension settings.

@karthiknadig
Copy link
Member

@MinekPo1 Can you share what you have set or is it just default?

@MinekPo1
Copy link
Author

@karthiknadig default + point 2 of steps to reproduce (added hidden.py which is the file holding the shown code)

@karthiknadig
Copy link
Member

This should be handled in pylance. Although relying on that setting might not work in the long term. We have plans to remove that setting in favor of tool specific settings.

@karthiknadig karthiknadig transferred this issue from microsoft/vscode-python Aug 31, 2022
@judej judej added the needs investigation Could be an issue - needs investigation label Aug 31, 2022
@heejaechang
Copy link
Contributor

related to #3266

@heejaechang heejaechang self-assigned this Aug 31, 2022
@heejaechang heejaechang added enhancement New feature or request fixed in next version (main) A fix has been implemented and will appear in an upcoming version and removed needs investigation Could be an issue - needs investigation labels Aug 31, 2022
@debonte
Copy link
Contributor

debonte commented Sep 8, 2022

This issue has been fixed in prerelease version 2022.9.11, which we've just released. You can find the changelog here: CHANGELOG.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fixed in next version (main) A fix has been implemented and will appear in an upcoming version
Projects
None yet
Development

No branches or pull requests

5 participants