profile
viewpoint

create barnchcronning9/math-lexer

branch : minimal-example-with-container

created branch time in 6 days

startedmicrosoft/vscode-remote-try-rust

started time in 21 days

created repositoryjeremyBanks/noloads

created time in a month

PR opened dtolnay/remain

Add support for sorting named struct fields.

resolves #1

+102 -13

0 comment

12 changed files

pr created time in a month

push eventjeremyBanks/remain

Jeremy Banks

commit sha c41add741dbe4a97fb04d5236ba91f87ca567b4e

Add support for sorting named struct fields.

view details

push time in a month

push eventjeremyBanks/remain

Jeremy Banks

commit sha 976bed168269919ff4207c6519cb683aa41d3137

Add support for sorting named struct fields.

view details

push time in a month

create barnchjeremyBanks/remain

branch : structs

created branch time in a month

fork jeremyBanks/remain

Compile-time checks that an enum or match is written in sorted order

fork in a month

push eventjeremyBanks/hide-hnq

Carl Walsh

commit sha 4136117587ea7c0e3857de7b3b9d6bbb4415e422

Handle ShowMore link missing The StackOverflow HNQ used to have a "more hot qustions" link, but that isn't showing now, which breaks the content hiding. Only try to hide the link if it's present. Fixes #7

view details

push time in 2 months

PR merged jeremyBanks/hide-hnq

Handle ShowMore link missing

Fixes #7

+5 -2

0 comment

2 changed files

jeremyBanks

pr closed time in 2 months

issue closedjeremyBanks/hide-hnq

Not working as of April 2019

Not working for me, somebody else had this issue too.

In the chrome debugger on content.js:97, hnq.querySelector('a.show-more') is returning null which causes an error:

content.js:124 TypeError: Cannot read property 'dataset' of null at content.js:97

closed time in 2 months

darthwalsh

PR opened jeremyBanks/hide-hnq

Handle ShowMore link missing

Fixes #7

+5 -2

0 comment

2 changed files

pr created time in 2 months

MemberEvent

starteddtolnay/remain

started time in 2 months

issue openeddtolnay/remain

Struct field support

Neat package! I saw Alex Crichton mention it in his RustLatam talk about procedural macros, right after looking at rust-lang/rustfmt#3422 and rust-lang/rust-clippy#3822 discussing options for making sure that struct fields are sorted. This had was wondering if you were considering adding support for also ensuring that struct fields remain sorted, or if you wanted to keep it only focused on enums.

Cheers

created time in 2 months

issue commentrust-lang/rustfmt

Feature request: alphabetic sorting of struct/enum fields

In addition to being able to sort fields, it would also be nice to be able to sort top-level items (Structs, Traits, etc.) in a file.

PvdBerg1998

comment created time in 2 months

issue commentjeremyBanks/hide-hnq

Not working as of April 2019

(Previously replied by email, but for public reference:) I am no longer maintaining this extension, and I no longer use Chrome. I will archive this repo for clarity, but if someone wants to fork and fix, I would be happy to add a notice directing visitors there instead.

darthwalsh

comment created time in 2 months

push eventjeremyBanks/hide-hnq

Jeremy Banks

commit sha 3a437df008f4fc2be7b6a36e4ae452b1b2068b6d

release under MIT and Blue Oak licenses

view details

push time in 2 months

PublicEvent
GollumEvent

startedcitybound/citybound

started time in 2 months

starteddanistefanovic/build-your-own-x

started time in 2 months

issue closedMicrosoft/pyright

`if isinstance(instance, SuperClass):` loses type

Sort-of the reverse of #24: InstanceOfTypeConstraint constrains the subject's type to None/Never when it's checked against a superclass.

Maybe this should be a no-op instead? I'm not entirely sure, but mypy doesn't flag this as an error.

class SuperClass:
    def __init__(self) -> None:
        self.property: None = None

class MyClass(SuperClass):
    pass

def f(instance: MyClass) -> None:
    if isinstance(instance, SuperClass):
        print(instance.property)
$ npx pyright@1.0.4 server/src/tests/samples/isinstance.py
Finding source files
Found 1 source files
Analyzed 1 file in 0.981sec
/mnt/c/Users/_/pyright/server/src/tests/samples/isinstance.py
  'property' is not a known member of 'None' (10, 24)
1 error, 0 warnings

Equivalent example with object instead of an explicit superclass:

class MyClass:
    def __init__(self) -> None:
        self.property: None = None

def f(instance: MyClass) -> None:
    if isinstance(instance, object):
        print(instance.property)

closed time in 3 months

jeremyBanks

issue commentMicrosoft/pyright

`if isinstance(instance, SuperClass):` loses type

LGTM, thanks! I tried a few similar examples and pyright@master's results were consistent with MyPy.

jeremyBanks

comment created time in 3 months

delete tag jeremyBanks/pyright

delete tag : 2019.03.23

delete time in 3 months

delete tag jeremyBanks/pyright

delete tag : 1.0.0

delete time in 3 months

delete branch jeremyBanks/pyright

delete branch : master

delete time in 3 months

create barnchjeremyBanks/pyright

branch : dev

created branch time in 3 months

delete branch jeremyBanks/pyright

delete branch : issue-24

delete time in 3 months

push eventjeremyBanks/pyright

Jeremy Banks

commit sha e618866e23a9446cbe3d36c715aca139e14b4d89

WIP

view details

push time in 3 months

issue openedMicrosoft/pyright

`if isinstance(instance, SuperClass):` loses type instead of being no-op

Sort-of the reverse of #24: InstanceOfTypeConstraint constrains the subject's type to None/Never when it's checked against a superclass. This should probably be a no-op instead.

class SuperClass:
    def __init__(self) -> None:
        self.property: None = None

class MyClass(SuperClass):
    pass

def f(instance: MyClass) -> None:
    if isinstance(instance, SuperClass):
        print(instance.property)
$ npx pyright@1.0.4 server/src/tests/samples/isinstance.py
Finding source files
Found 1 source files
Analyzed 1 file in 0.981sec
/mnt/c/Users/_/pyright/server/src/tests/samples/isinstance.py
  'property' is not a known member of 'None' (10, 24)
1 error, 0 warnings

Equivalent example with object instead of an explicit superclass:

class MyClass:
    def __init__(self) -> None:
        self.property: None = None

def f(instance: MyClass) -> None:
    if isinstance(instance, object):
        print(instance.property)

created time in 3 months

issue commentMicrosoft/pyright

Document how to run Pyright from a git branch

I'm not sure if this is the same confusion as the OP, but FWIW when I first downloaded and built pyright (from a release tag) I was confused because it didn't seem to be using the built-in typeshed definitions by default, so it was complaining that things like instanceof weren't defined. The actual installed release build seems to use these automatically, but I eventually realized I needed to specify -t dist/typeshed-fallback to get the same behaviour when I built myself. Perhaps that could be clarified (or fixed, if that isn't supposed to be necessary).

gwk

comment created time in 3 months

push eventjeremyBanks/pyright

Jeremy Banks

commit sha fdbdb4dbead193ddafda0f11b3e0107ce24f1eaf

WIP

view details

push time in 3 months

push eventjeremyBanks/pyright

Jeremy Banks

commit sha efbac96c01ea1f2dc6695ed1960b31205bf28bd4

WIP

view details

push time in 3 months

create barnchjeremyBanks/pyright

branch : issue-24

created branch time in 3 months

push eventjeremyBanks/pyright

Bruno P. Kinoshita

commit sha df84fe04e375e02d9998137841c475d0f0ddfa56

Be consistent on log messages, using file location instead of URI as in other methods

view details

Eric Traut

commit sha 08baed6f0620e8457beddbcb91531385aac550b1

Merge pull request #5 from kinow/log-consistency-1 Be consistent on log messages, using file location instead of URI as in other methods

view details

Eric Traut

commit sha a2c1fdef39c88237db02274a1cf7abbd7c77d45b

Fixed bug that caused a crash when last file in program was removed from the source file list.

view details

Eric Traut

commit sha 8afce050bdba2305bc657b230fa73a609cb85626

Fixed unit tests.

view details

Eric Traut

commit sha 396b6888fb07ee1a812b57171ac19d4dc540dd20

Fixed crashing bug that could occur if typeshed files were not found.

view details

Eric Traut

commit sha 5e83a19a0460202a1cf6b32b3a870c55240c6006

Added "source" string to diagnostics output so errors and warnings are displayed with "pyright" in VS Code.

view details

Eric Traut

commit sha 0563813b9e9fff268e70e1a7b5a4a88ca177524c

Updated build scripts to build command-line version into an npm module.

view details

Eric Traut

commit sha c9b18356a4bd95c14a56932b80db80f538d9b520

Removed postinstall script so npm installation is possible.

view details

Eric Traut

commit sha e7e9e0a8ebc586f8f290e64e888ed99241ee9815

Added logic in command-line parser to print usage if no files or projects are specified. Added "bin" section to project.json. Bumped version to 1.0.3.

view details

Eric Traut

commit sha f5362e9e09c577f3e04dd05174a6283c25a0a4b4

Added installation instructions for command-line tool.

view details

Eric Traut

commit sha 026a1f48c082bbf772234876d2b578778ad66bff

Added more documentation around the -v command-line switch.

view details

Eric Traut

commit sha 7e859f73d9114f59852f4a8869754747a0001cda

Fixed a couple of bugs in the docs.

view details

push time in 3 months

issue openedMicrosoft/pyright

`isinstance(instance, SubClass)` loses type instead of narrowing

Given an instance of a SuperClass, I would expect isinstance(instance, SubClass) to narrow the type of instance to SubClass in the following branch. Instead, the type appears to have been lost and replaced with NoneType.

class SuperClass:
    def __init__(self) -> None:
        self.property: bool = True

class SubClass(SuperClass):
    pass

def function(instance: SuperClass) -> None:
    if isinstance(instance, SubClass):
        print(instance.property)
$ mypy --strict example.py && echo "no errors"
no errors
$ pyright example.py
Finding source files
Found 1 source files
Analyzed 1 file in 1.229sec
/Users/jbanks/Desktop/example.py
  'property' is not a known member of 'None' (10, 24)
1 error, 0 warnings

For a slightly smaller example, we get the same error narrowing from the base object type:

class MyClass:
    def __init__(self) -> None:
        self.property: bool = True


def function(instance: object) -> None:
    if isinstance(instance, MyClass):
        print(instance.property)

created time in 3 months

issue commentMicrosoft/pyright

Unable to initialize a constrained defaultdict

That this may be a duplicate of #19, or it may requires further changes.

jeremyBanks

comment created time in 3 months

issue openedMicrosoft/pyright

Unable to initialize a constrained defaultdict

My code has a collections.defaultdict mapping from strs to ints, default to 0 for missing values. I've been using the following annotations with MyPy to enforce those types.

from collections import defaultdict
from typing import DefaultDict

x: DefaultDict[str, int] = defaultdict(int)

However, Pyright tells me that the assignment is illegal.

Expression of type 'defaultdict[Any, Any]' cannot be assigned to type 'DefaultDict[str, int]'

created time in 3 months

fork jeremyBanks/pyright

Static type checker for Python

fork in 3 months

startedMicrosoft/pyright

started time in 3 months

PR opened tms/stack-utilities

we https now

https://meta.stackexchange.com/q/292058/134300

+2 -2

0 comment

1 changed file

pr created time in 3 months

push eventjeremyBanks/stack-utilities

Jeremy Banks

commit sha 0bb3d18a289a3cac4a553dc4b3d25daf70ee6a61

we https now https://meta.stackexchange.com/q/292058/134300

view details

push time in 3 months

fork jeremyBanks/stack-utilities

Small utilities that aren't worth cluttering up StackExchangeScripts with

fork in 3 months

more