pyrefly 0.29.0__py3-none-macosx_10_12_x86_64.whl → 0.40.0__py3-none-macosx_10_12_x86_64.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.29.0
3
+ Version: 0.40.0
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
@@ -19,13 +19,16 @@ Project-URL: documentation, https://pyrefly.org/en/docs/
19
19
 
20
20
  # Pyrefly
21
21
 
22
- Currently incomplete and under active development. Please
23
- [open an issue](https://github.com/facebook/pyrefly/issues/new/choose) if you
24
- find any bugs.
22
+ Pyrefly is a type checker and language server for Python, which provides
23
+ lightning-fast type checking along with IDE features such as code navigation,
24
+ semantic highlighting, and code completion. It is available as a
25
+ [command-line tool](https://pyrefly.org/en/docs/installation/) and a
26
+ [VSCode extension](https://marketplace.visualstudio.com/items?itemName=meta.pyrefly).
27
+
28
+ See the [Pyrefly website](https://pyrefly.org) for full documentation and how to
29
+ add Pyrefly to your editor of choice.
25
30
 
26
- Pyrefly is a static type checker for Python that helps you catch type-related
27
- errors before your code runs. It analyzes your Python code to ensure type
28
- consistency throughout your codebase, making your applications more reliable and
29
- easier to maintain. Pyrefly supports both IDE integration and CLI usage, giving
30
- you flexibility in how you incorporate type checking into your workflow.
31
+ Currently under active development with known issues. Please
32
+ [open an issue](https://github.com/facebook/pyrefly/issues/new/choose) if you
33
+ find bugs.
31
34
 
@@ -0,0 +1,7 @@
1
+ pyrefly-0.40.0.data/scripts/pyrefly,sha256=rzb3dHyg9sGl4bRo1BT4bm73IdYZYZBJQnmamGyKrws,18052064
2
+ pyrefly-0.40.0.dist-info/METADATA,sha256=k2F7lP7L5dxBCEYrTcBytZYMO4qqchUJI7B3VrH-PpE,1435
3
+ pyrefly-0.40.0.dist-info/WHEEL,sha256=Q2rHGMsq0X7G6BJbXk6ZaKL4ytLObKy0EZzrqvyuZlk,103
4
+ pyrefly/__init__.py,sha256=ZOtiqHbMokXeQZN4vAgy4S5lP-Xci8E1hLig9LwdBjM,259
5
+ pyrefly/__main__.py,sha256=gdJp64de6Gxpy29Yaqb44RBfOi_QaJm3FzgwsysANk8,1167
6
+ pyrefly/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
+ pyrefly-0.40.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: maturin (1.9.3)
2
+ Generator: maturin (1.9.6)
3
3
  Root-Is-Purelib: false
4
4
  Tag: py3-none-macosx_10_12_x86_64
@@ -1,7 +0,0 @@
1
- pyrefly-0.29.0.data/scripts/pyrefly,sha256=YJ-rlR9RFrf_eXjKI8r-Q2Ct2ZLmz9r8lACNawLts_s,14402296
2
- pyrefly-0.29.0.dist-info/METADATA,sha256=-DVXEb1jycrowQcxyglqprShyVc_emvybzTtUwfKHeg,1296
3
- pyrefly-0.29.0.dist-info/WHEEL,sha256=FMlpArrDBuf1ZqNVjPzYR8hBKv2S_sJQIgQGVUwJY3g,103
4
- pyrefly/__init__.py,sha256=ZOtiqHbMokXeQZN4vAgy4S5lP-Xci8E1hLig9LwdBjM,259
5
- pyrefly/__main__.py,sha256=0i16JJ57xmIGcuM4VcIwwO4KrN2JtY8fM12YG-Cd-gk,322
6
- pyrefly/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
- pyrefly-0.29.0.dist-info/RECORD,,