profile
viewpoint
Graham Wheeler gramster Microsoft United States https://www.linkedin.com/in/grahamwheeler Engineering Manager, Python & AI Tools

gramster/pythonbootcamp 20

Jupyter notebooks for a Python data science bootcamp I ran at eBay

gramster/spells 3

A simple text adventure engine and game in Python. Helping my daughter learn to code!

gramster/Pascal 2

A Pascal compiler and p-code virtual machine

gramster/Pascal2C 2

A Pascal-to-C convertor

gramster/comictagger 1

A cross-platform GUI/CLI app for writing metadata to digital comics (fork)

gramster/MIDITool 1

A very old MIDI sequencer I wrote in 1991

gramster/PEW 1

A Protocol Engineering Workbench - IDE, compiler, VM, interpreter, debugger for Estelle (Extended State Transition Language). This is old code; it probably compiles and runs command line tools on Unix, but the editor/IDE was written for MS-DOS.

gramster/backgammon 0

A Backgammon program I wrote in MS-DOS days

issue commentmicrosoft/pylance-release

Sort imports is severely bugged with Pylance language server

It’s probably better to disable isort if possible because I think that’s where the problem is.

On Thu, Jul 2, 2020 at 12:15 PM Jake Bailey notifications@github.com wrote:

We're still working on what "next release" or "hotfix" will mean, but I expect that this will be disabled in the next version (whichever that is) and we can see if that fixes the race.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/microsoft/pylance-release/issues/23#issuecomment-653178360, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVCPCHH576T5YFUURNPKP3RZTMDNANCNFSM4OOGNNHQ .

ErwanDL

comment created time in 2 days

issue openedmicrosoft/pylance-release

Auto-imports should add the import before the code that generated the issue

<!-- Read the guidelines for filing an issue first.

https://github.com/microsoft/pylance-release/blob/master/TROUBLESHOOTING.md#filing-an-issue -->

Environment data

<!-- To find your version:

Select "View: Toggle Output" from the command palette (Ctrl+Shift+P on Windows/Linux, Command+Shift+P on macOS), then select "Python Language Server" in the dropdown on the right. Look for the line Pylance Language Server version X in the console. -->

  • Language Server version: 2020.6.1
  • OS and version: MacOS
  • Python version (& distribution if applicable, e.g. Anaconda): 3.8

Expected behaviour

If I enter this code:

gc.

import pandas

then go to the gc. to do a quick fix for the import, I would expect the import to come before the gc. code.

Actual behaviour

The import is added just before import pandas, so I end up with:

gc.


import gc
import pandas

If the existing imports are below the location where the new reference occurs, the new import should be added higher up. I guess we add next to the first existing imports but should then special-case this and add the new import at the top of the file.

Logs

<!-- Enable trace logging by adding "python.analysis.logLevel": "Trace" to your settings.json configuration file.

Adding this will cause a large amount of info to be printed to the Python output panel. This should not be left long term, as the performance impact of the logging is significant. -->

XXX

Code Snippet / Additional information

<!-- Note: If you think a GIF of what is happening would be helpful, consider tools like https://www.cockos.com/licecap/, https://github.com/phw/peek or https://www.screentogif.com/ . -->

XXX

created time in 2 days

issue commentmicrosoft/pylance-release

Auto-import doesn't work

Try this:

  • Type gc.
  • You should get a squiggle under gc
  • If you hover on gc you should get a floating error popup saying it is not defined
  • If you click on gc you should get a 'quick fix' lightbulb. and if you click on that you should get the option to add the import
imankulov

comment created time in 2 days

issue commentmicrosoft/pylance-release

spurious error using pytorch Tensor.item()

Interesting, so that hint seems to have coerced x before the assignment. @EricTraut, any ideas for a workaround here?

joelgrus

comment created time in 3 days

issue commentmicrosoft/pylance-release

spurious error using pytorch Tensor.item()

Hi Joel,

As a short term workaround, you can use a comment to override the type inference, as in:

x = t.item()  # type: int

It's not ideal if you don't want these in your code, but I expect there are going to be many edge cases that we will have to address over the next few months (this is part of the reason it is a separately-installed extension and not installed by default by the Python extension).

joelgrus

comment created time in 3 days

issue commentmicrosoft/pylance-release

if/elif/else statement need better error handling

There is no one right way to report a syntax error; it usually depends on the parser. In pylance's case it knows that '=' is not appropriate at that location so it wants to terminate the if after if spam and reports a missing ':'.

But if I read you correctly, what you are saying is that you would prefer the error message to be "Syntax error" instead of "Expected <token>"; maybe even better would be "Syntax error: expected <token>".

Rabbit994

comment created time in 3 days

issue commentmicrosoft/pylance-release

Sort imports is severely bugged with Pylance language server

Is this a dup of https://github.com/microsoft/vscode-python/issues/10579? In which case it may not be a pylance issue.

ErwanDL

comment created time in 3 days

issue commentmicrosoft/pylance-release

pd.DataFrame not in completion results

I think the stubs are alright here, but the only class that's showing as a completion off pd. is the public one defined in __init__.py itself, not the ones that are imported from other modules by __init__.py. Those classes work fine once you have them; i.e. you get completions for pd.DataFrame(). etc. So there's something odd going on.

qubitron

comment created time in 3 days

issue commentmicrosoft/pylance-release

JSON config does not recognize Pylance as language server

Hi Tom

We will likely add it as a valid language server setting option in the Python extension at some point. However, as the set of choices in the Python extension must be statically declared, and as pylance is a separate extension and in early release, we felt that that was premature and installing it should be enough to enable it for now (and you can uninstall/disable the extension to turn it off).

It is probably worth making this clearer in the documentation.

kovalensue

comment created time in 3 days

issue commentmicrosoft/pylance-release

Repo title is confusing

This repo is to capture bug reports, etc, not just for release notes.

leebrian

comment created time in 3 days

issue commentmicrosoft/pylance-release

Python 2.7 syntax not recognised

Agreed; we should make it clear in Marketplace description.

schlamar

comment created time in 3 days

issue commentmicrosoft/pylance-release

pylint checks with pylance enabled

It looks like pylint only runs when LS is set to Jedi. It doesn't run LS set to with MPLS or pylance. There is some risk of clobbering here but it seems we should still run the winter, especially if we have listing on save set.

yankyhoffman

comment created time in 4 days

issue commentmicrosoft/pylance-release

pylint checks with pylance enabled

Can you check your 'PyLint enabled' setting? Maybe you just need to re-enable it.

yankyhoffman

comment created time in 4 days

startedmicrosoft/pylance-release

started time in 4 days

issue commentmicrosoft/python-language-server

Maintanance Status?

Here we go for Visual Studio Code! Please try it out and let us know what you think.

https://devblogs.microsoft.com/python/announcing-pylance-fast-feature-rich-language-support-for-python-in-visual-studio-code/

It will be some time before we can bring this to Visual Studio but we plan to do so.

Matelasse

comment created time in 4 days

issue openedmicrosoft/vscode-python

Unnecessary out window noise

Seeing this in my output; not sure if it is an issue, but the stack trace seems unnecessary anyway:

Error 2020-06-30 13:05:35: Failed to check if file needs to be fixed [EntryNotFound (FileSystemError): Unable to read file '/Users/grwheele/repos/validate_stubs/.vscode/settings.json' (EntryNotFound (FileSystemError): Error: ENOENT: no such file or directory, open '/Users/grwheele/repos/validate_stubs/.vscode/settings.json') at _handleError (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:657:25) at processTicksAndRejections (internal/process/task_queues.js:85:5) at async v.readText (/Users/grwheele/.vscode-insiders/extensions/ms-python.python-2020.7.91394-dev/out/client/extension.js:1:567615) at async p.doesFileNeedToBeFixed (/Users/grwheele/.vscode-insiders/extensions/ms-python.python-2020.7.91394-dev/out/client/extension.js:48:963410) at async /Users/grwheele/.vscode-insiders/extensions/ms-python.python-2020.7.91394-dev/out/client/extension.js:48:962537 at async Promise.all (index 1) at async p.getFilesToBeFixed (/Users/grwheele/.vscode-insiders/extensions/ms-python.python-2020.7.91394-dev/out/client/extension.js:48:962483) at async p.updateTestSettings (/Users/grwheele/.vscode-insiders/extensions/ms-python.python-2020.7.91394-dev/out/client/extension.js:48:962110)] { code: 'FileNotFound', name: 'EntryNotFound (FileSystemError)' }

created time in 4 days

issue openedmicrosoft/vscode-python

Don't show tip about changing Python environment if user already has done so

The Interpreters.selectInterpreterTip should not be shown if the user has already gone and selected an environment from the status bar.

(Originally reported by Kai).

created time in 4 days

issue commentmicrosoft/vscode-python

Remove support for rope

If people are attempting to use it, but rope doesn't work for Python 3, we should just remove it, and add this back in the future when either Jedi or the language server supports it. Can we disable the functionality as a short-term change until we remove it.

mjbvz

comment created time in 4 days

create barnchgramster/langpack

branch : master

created branch time in 5 days

created repositorygramster/langpack

Sample extension for Visual Studio Code to add additional language support to other extensions

created time in 5 days

issue commentmicrosoft/python-language-server

Maintanance Status?

We should be in public preview very soon for Visual Studio Code. Visual Studio integration will happen after that.

Matelasse

comment created time in 5 days

issue openedmicrosoft/vscode-python

Add release gate tests for activation time

We should have some tests before we release to ensure we have not regressed significantly on activation.

created time in 5 days

issue commentTylerGlaiel/voicemask

Error codes

I'm getting an actual error:

Arduino: 1.8.12 (Mac OS X), Board: "Arduino Nano, ATmega328P"

In file included from /Users/gram/Documents/Arduino/sketch_jun18a/sketch_jun18a.ino:9:0: /Users/gram/Documents/Arduino/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.h:151:52: error: redefinition of 'const uint8_t _NeoPixelSineTable [256]' static const uint8_t PROGMEM _NeoPixelSineTable[256] = { ^

Vortex1470

comment created time in 16 days

CommitCommentEvent
CommitCommentEvent
CommitCommentEvent

startedlordwelch/comictagger

started time in a month

startedlingster/django-bootstrap-studio-tools

started time in 2 months

startedjunegunn/fzf

started time in 2 months

push eventgramster/tweeter

Graham Wheeler

commit sha 2a7044f78ba685801c6021987e84744b789689d5

Created skeleton with django-admin.

view details

push time in 2 months

create barnchgramster/tweeter

branch : master

created branch time in 2 months

created repositorygramster/tweeter

Learning Django with a Twitter-like project

created time in 2 months

push eventgramster/notebooks

Graham Wheeler

commit sha 5a78f50ad9c1e8e244ba0d62670033c34471740e

Comment update.

view details

push time in 2 months

push eventgramster/notebooks

Graham Wheeler

commit sha 24e77a5444e202f1b7ef61684b1bdcc59eec1195

Added synthetic IDE: columns.

view details

push time in 2 months

push eventgramster/notebooks

Graham Wheeler

commit sha 7f344aaa8806b86c3e07af9536c4f2db3d425369

Add synthetic 'Job: Data Scientist' column.

view details

push time in 2 months

push eventgramster/notebooks

Graham Wheeler

commit sha d5a921226e3082b6374deb6f0163d04818eb1604

Added Python survey analysis notebook. Updated Covid19 notebook.

view details

push time in 2 months

issue commentpython/typeshed

Explore building third party stubs as packages

Mostly the tools I already mentioned. Visual Studio Code's language server and Jedi definitely. PyCharm possibly although I can't speak for what they do.

srittau

comment created time in 2 months

issue commentoulvhai/MWeb-issues

Note link not working

Any update on this?

rmrnc

comment created time in 2 months

issue commentmicrosoft/PTVS

Loading the first .py file into VS 2019 is extremely slow - about 6-8 seconds

Has anybody at Microsoft tried this? How long does it take?

Hugues answered that above. And mentioned that the store version of Python is specifically very slow and if you install Python from python.org you should see an improvement.

vsfeedback

comment created time in 3 months

issue commentmicrosoft/PTVS

Loading the first .py file into VS 2019 is extremely slow - about 6-8 seconds

Hi Bruce, you can provide more information here; this is where we prefer to track issues as PTVS is an open-source project developed in this repo.

If it is environment discovery, that is something that we are reworking in VS Code and will bring those changes to VS once done.

vsfeedback

comment created time in 3 months

issue commentpython/typeshed

Explore building third party stubs as packages

Overall I like this proposal. I think it's important to note that type stubs are useful beyond just the realm of static type checkers. In particular, editors are increasingly leveraging type stubs to greatly improve the editing experience in dynamic languages. I.e., apart from type checking, stubs can be used to provide autocomplete and other features. Visual Studio Code, Jedi, and PyCharm can all leverage type stubs to provide better user experience. And there are a number of challenges in these environments where there is both source and stubs available. Problems editors that use stubs have to solve include:

  • how to map method/function stubs back to source files, so that things like 'go to definition' work
  • showing docstrings on hover (or at other times) - this is related to the above. If method signatures come from stubs then these have to be reconciled back to source to get docstrings. An alternative would be to replicate docstrings in the stubs. There are maintenance costs associated with that, that could be alleviated by better tooling
  • reconciling type stubs with existing but possibly incomplete type hints in the source code
  • automatically identifying the best type stub version to use for a particular package version. Users shouldn't have to explicitly have to point to or install type stubs for the packages they use; tooling should be able to manage this automatically and transparently.

Type inference in dynamic languages is difficult and the results will always be mixed, so leveraging type stubs is a way to work around this, particularly in egregious cases.

Some of these issues pertain to the contents of type stub files, and some affect packaging and version resolution.

srittau

comment created time in 3 months

issue closedmicrosoft/python-language-server

Maintanance Status?

Commits have dropped lately, what's the status of the maintenance?

closed time in 3 months

Matelasse

issue commentmicrosoft/python-language-server

Maintanance Status?

Thanks for asking! We are currently evaluating new approaches to static analysis that we think can provide a better user experience. We are not planning on adding new features while we complete this process, but we are still making bug fixes so please continue filing & upvoting issues that affect you.

Matelasse

comment created time in 3 months

more