Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local Type Completeness Check failures #16839

Open
parkedwards opened this issue Jan 23, 2025 · 2 comments
Open

Local Type Completeness Check failures #16839

parkedwards opened this issue Jan 23, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@parkedwards
Copy link
Contributor

Bug summary

While running pre-commit checks locally on a doc change (so modifying an .mdx) as well as adding a .png asset, I couldn't get my Type Completeness Check uv pre-commit to pass

Type Completeness Check..................................................Failed
- hook id: type-completeness-check
- exit code: 1

/Users/edwardpark/CODE/prefect/prefect/venv/lib/python3.12/site-packages/pyright/dist/dist/vendor.js:2
exports.id=121,exports.ids=[121],exports.modules={2007:(A,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AliasFS=void 0;const o=t(5086);class r extends o.ProxiedFS{constructor(A,{baseFs:e,pathUtils:t}){super(t),this.target=A,this.baseFs=e}getRealPath(){return this.target}getBaseFs(){return this.baseFs}mapFromBase(A){return A}mapToBase(A){return A}}e.AliasFS=r},7237:(A,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CwdFS=void 0;const o=t(6825),r=t(5086),n=t(8169);class i extends r.ProxiedFS{constructor(A,{baseFs:e=new o.NodeFS}={}){super(n.ppath),this.target=this.pathUtils.normalize(A),this.baseFs=e}getRealPath(){return this.pathUtils.resolve(this.baseFs.getRealPath(),this.target)}resolve(A){return this.pathUtils.isAbsolute(A)?n.ppath.normalize(A):this.baseFs.resolve(n.ppath.join(this.target,A))}mapFromBase(A){return A}mapToBase(A){return this.pathUtils.isAbso

SyntaxError: Unexpected token =
    at new Script (vm.js:79:7)
    at createScript (vm.js:251:10)
    at Object.runInThisContext (vm.js:303:10)
    at Module._compile (internal/modules/cjs/loader.js:657:28)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)

I noticed this was coming from a .js bundle, so I thought that maybe my node version might be a culprit. Bumping my node version to something a little more recent (v10 -> v22) seemed to help with the JS bundle error, but threw a new failure

➜ node --version
v22.5.1

after the node bump:

Type Completeness Check..................................................Failed
- hook id: type-completeness-check
- exit code: 1

Module name: "prefect"
Package directory: ""
Module directory: ""
   error: No py.typed file found

Symbols used in public interface:

Symbols exported by "prefect": 0
  With known type: 0
  With ambiguous type: 0
  With unknown type: 0
    (Ignoring unknown types imported from other packages)

Other symbols referenced but not exported by "prefect": 0
  With known type: 0
  With ambiguous type: 0
  With unknown type: 0

Symbols without documentation:
  Functions without docstring: 0
  Functions without default param: 0
  Classes without docstring: 0

Type completeness score: 0%

Completed in 0.181sec

I'm thinking I might be missing some dependency or typefile, but couldn't identify what exactly

Version info

➜ prefect version
Version:             3.1.11
API version:         0.8.4
Python version:      3.12.7
Git commit:          e448bd34

Additional context

No response

@parkedwards parkedwards added the bug Something isn't working label Jan 23, 2025
@parkedwards
Copy link
Contributor Author

i seem to have a src/prefect/py.typed (empty) file

Image

@parkedwards
Copy link
Contributor Author

found this on a pyright issue - looks like node v20 is the furthest back that pyright will have active support

microsoft/pyright#8217 (reply in thread)

I can make mention of this minimum somewhere - but still stumped by the 0% completion score failure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant