pyrefly 0.33.0__py3-none-win32.whl → 0.33.1__py3-none-win32.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pyrefly might be problematic. Click here for more details.

pyrefly/__main__.py CHANGED
@@ -3,10 +3,31 @@
3
3
  # This source code is licensed under the MIT license found in the
4
4
  # LICENSE file in the root directory of this source tree.
5
5
 
6
+ import os
6
7
  import subprocess
7
8
  import sys
9
+ import sysconfig
10
+
11
+
12
+ def get_pyrefly_bin() -> str:
13
+ # Try to figure out where the pyrefly executable is installed.
14
+ # First look for a global installation.
15
+ pyrefly_exe = "pyrefly" + sysconfig.get_config_var("EXE")
16
+ pyrefly_bin = os.path.join(sysconfig.get_path("scripts"), pyrefly_exe)
17
+ if os.path.isfile(pyrefly_bin):
18
+ return pyrefly_bin
19
+ # Next look for a user-local installation.
20
+ if sys.version_info >= (3, 10): # get_preferred_scheme is new in 3.10
21
+ user_scheme = sysconfig.get_preferred_scheme("user")
22
+ pyrefly_bin = os.path.join(
23
+ sysconfig.get_path("scripts", scheme=user_scheme), pyrefly_exe
24
+ )
25
+ if os.path.isfile(pyrefly_bin):
26
+ return pyrefly_bin
27
+ # We didn't find the executable; let's just hope it's on the path.
28
+ return "pyrefly"
8
29
 
9
30
 
10
31
  if __name__ == "__main__":
11
- proc = subprocess.run(["pyrefly", *sys.argv[1:]])
32
+ proc = subprocess.run([get_pyrefly_bin(), *sys.argv[1:]])
12
33
  sys.exit(proc.returncode)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyrefly
3
- Version: 0.33.0
3
+ Version: 0.33.1
4
4
  Classifier: Development Status :: 3 - Alpha
5
5
  Classifier: Programming Language :: Python
6
6
  Classifier: Programming Language :: Python :: 3
@@ -10,7 +10,7 @@ Classifier: Operating System :: Microsoft :: Windows
10
10
  Classifier: Operating System :: POSIX :: Linux
11
11
  Classifier: Intended Audience :: Developers
12
12
  Classifier: Topic :: Software Development
13
- Summary: A fast Python type checker written in Rust
13
+ Summary: A fast type checker and language server for Python with powerful IDE features
14
14
  Keywords: typechecker,typechecking
15
15
  Requires-Python: >=3.8
16
16
  Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
@@ -0,0 +1,7 @@
1
+ pyrefly-0.33.1.data/scripts/pyrefly.exe,sha256=6EHNzuHvCnwmQzKyDexsC5VE8W6wAptSYAVIhtbAtGA,14346240
2
+ pyrefly-0.33.1.dist-info/METADATA,sha256=_gbxjv1WXQwsnW8BJdPAkKIDr1w58r8Lmujh0Wn6NdM,1449
3
+ pyrefly-0.33.1.dist-info/WHEEL,sha256=uT4IaxTLAwDsS7H6Z9jQmlZsLccZQ2CCUpoUS6OYuwI,89
4
+ pyrefly/__init__.py,sha256=D9YGB4huyjNc36gMcbfOfnfFRF1LqeT70FIQLGSTDyg,267
5
+ pyrefly/__main__.py,sha256=rRjgImfKHDAHWF4XsTueXFjoVHGDoFd6v5J5zzUmMxk,1200
6
+ pyrefly/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
+ pyrefly-0.33.1.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- pyrefly-0.33.0.data/scripts/pyrefly.exe,sha256=GLXGPonx5qt_GyTL6c31bNuJb8Jq0uKY722ndldOlK8,14195200
2
- pyrefly-0.33.0.dist-info/METADATA,sha256=BEeFmE46KYPdUIt4Qax2k8u8nhvX4r0_oAxdF8WL81U,1414
3
- pyrefly-0.33.0.dist-info/WHEEL,sha256=uT4IaxTLAwDsS7H6Z9jQmlZsLccZQ2CCUpoUS6OYuwI,89
4
- pyrefly/__init__.py,sha256=D9YGB4huyjNc36gMcbfOfnfFRF1LqeT70FIQLGSTDyg,267
5
- pyrefly/__main__.py,sha256=2mFMAjtNCQh4zgM2yHwsj5VVDFCWDlFU4yZ2ISJDtAw,334
6
- pyrefly/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
- pyrefly-0.33.0.dist-info/RECORD,,