Mypy does not respect setting in mypy.ini to exclude folder from checking when called from VS Code

The issue is that VS Code is invoking mypy file by file. And mypy doesn’t use the exclude option when invoked on a single file. The workaround is using python.linting.ignorePatterns in the settings.json. “python.linting.ignorePatterns”: [ “venv/**/*.py” ] More info about the behaviour of exclude: Note that this flag only affects recursive discovery, that is, when … Read more

Formatter black is not working on my VSCode…but why?

Update 2023-09-15: Now VSCode has a Microsoft oficial Black Formatter extension. It will probably solve your problems. Original answer: I use Black from inside VSCode and it rocks. It frees mental cycles that you would spend deciding how to format your code. It’s best to use it from your favorite editor. Just run from the … Read more

Exclude folder from mypy checking

The issue is that VS Code is invoking mypy file by file. And mypy doesn’t use the exclude option when invoked on a single file. The workaround is using python.linting.ignorePatterns in the settings.json. “python.linting.ignorePatterns”: [ “venv/**/*.py” ] More info about the behaviour of exclude: Note that this flag only affects recursive discovery, that is, when … Read more

Customizing syntax highlighting in Visual Studio Code

There are two concepts at play here: language grammars, which turn a text file into tokens with different scopes, and themes, which colorize those scopes in a (hopefully) eye-pleasing way. If you’re writing your own grammar, or converting from TextMate etc., there’s a chance you’re using different scopes than the ones defined by the theme. … Read more

VS Code: enable inline spell checker, but disable spell check in the “Problems” panel

See issues: don’t show in Problems pane. It is suggested to try: “cSpell.diagnosticLevel”: “Hint”, in your settings.json. This will remove them from the problems pane. However, in your files these “hints” are now indicated by three small dots under the beginning of the misspell and are not all that apparent. You can modify them with … Read more

Create Custom Language in Visual Studio Code

It’s possible with the new version 0.9.0. There’s an official documentation on how to add a custom language: https://github.com/microsoft/vscode-docs/blob/main/release-notes/v0_9_0.md You need a .tmLanguage file for the language you want to add. You can find existing files e.g. on GitHub or you can define your own language file. Look here to get an idea of how … Read more

How to trigger documentation popup in VS Code?

This is the editor.action.showHover command. It is bound to cmdk cmdi by default. Note: Shortcut works by holding down the cmd [ctrl in windows], then while holding press k then i You can change the keyboard shortcut with a keybinding such as: { “key”: “cmd+k ctrl+space”, “command”: “editor.action.showHover”, “when”: “editorTextFocus” }

Install extension from a specific repo/branch on GitHub?

Install vsce: Make sure you have Node.js installed. Then run: npm install -g vsce Check out the GitHub repo/branch you want. Depending on the project, you may need to install its dependencies (npm install or whatever package manager you use). Some can be packaged without dependencies. Run the following in the root of the project … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)