-
Notifications
You must be signed in to change notification settings - Fork 143
Closed as duplicate of#544
Labels
bugSomething isn't workingSomething isn't working
Description
Summary
Minimum code fail:
#fail.py
import os
def get_rel(output_directory: str) -> str:
assert os.path.exists(
output_directory
), f"Output directory '{output_directory}' does not exist. Create the folder and try again."
output_directory = os.path.relpath(output_directory)
return output_directoryAnd running in the terminal:
$ uvx ty check fail.py
WARN ty is pre-release software and not ready for production use. Expect to encounter bugs, missing features, and fatal errors.
error[invalid-assignment]: Object of type `bytes` is not assignable to `str`
--> fail.py:9:5
|
7 | output_directory
8 | ), f"Output directory '{output_directory}' does not exist. Create the folder and try again."
9 | output_directory = os.path.relpath(output_directory)
| ^^^^^^^^^^^^^^^^
10 | return output_directory
|
info: rule `invalid-assignment` is enabled by default
Found 1 diagnosticcommenting os.path.exists does not change the outcome.
Version
ty 0.0.1-alpha.2
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working