A powerful Minecraft command library.

Overview

logo

Mecha

GitHub Actions PyPI PyPI - Python Version Code style: black

A powerful Minecraft command library.

from mecha import Mecha

mc = Mecha()

function = """
    execute
        as @a                        # For each "player",
        at @s                        # start at their feet.
        anchored eyes                # Looking through their eyes,
        facing 0 0 0                 # face perfectly at the target
        anchored feet                # (go back to the feet)
        positioned ^ ^ ^1            # and move one block forward.
        rotated as @s                # Face the direction the player
                                     # is actually facing,
        positioned ^ ^ ^-1           # and move one block back.
        if entity @s[distance=..0.6] # Check if we're close to the
                                     # player's feet.
        run
            say I'm facing the target!
"""

ast = mc.parse(function, multiline=True)
print(mc.serialize(ast))  # execute as @a at @s anchored eyes facing ...

Introduction

This package provides everything you need for working with Minecraft commands in Python, whether you're looking to process commands or build abstractions on top.

Features

  • Extensible and version-agnostic mcfunction parser
  • Clean, immutable and hashable abstract syntax tree with source location
  • Command config resolver that flattens and enumerates all the valid command prototypes
  • Powerful rule dispatcher for processing specific ast nodes
  • Composable ast visitors and reducers
  • (soon) Execute arbitrary compilation passes in your beet pipeline
  • (soon) Expressive command API for writing commands in Python

Credits

Installation

The package can be installed with pip.

$ pip install mecha

Contributing

Contributions are welcome. Make sure to first open an issue discussing the problem or the new feature before creating a pull request. The project uses poetry.

$ poetry install

You can run the tests with poetry run pytest.

$ poetry run pytest

The project must type-check with pyright. If you're using VSCode the pylance extension should report diagnostics automatically. You can also install the type-checker locally with npm install and run it from the command-line.

$ npm run watch
$ npm run check

The code follows the black code style. Import statements are sorted with isort.

$ poetry run isort mecha tests
$ poetry run black mecha tests
$ poetry run black --check mecha tests

License - MIT

Comments
  • /place template causes error during validation

    /place template causes error during validation

    Validating a datapack (e.g. pack.zip) with a place template command (e.g. place template minecraft:fossil/spine_1 ~ ~ ~) leads to the following error:

    Error: Plugin "mecha.cli.validate" raised an exception.
    
    Traceback (most recent call last):
      File "/home/user/Desktop/pack/venv/lib/python3.10/site-packages/mecha/cli.py", line 30, in validate
        mc.compile(DataPack(path=path), report=mc.diagnostics)
      File "/home/user/Desktop/pack/venv/lib/python3.10/site-packages/mecha/api.py", line 432, in compile
        compilation_unit.ast = self.parse(
      File "/home/user/Desktop/pack/venv/lib/python3.10/site-packages/mecha/api.py", line 303, in parse
        ast = delegate(parser, stream)
      File "/home/user/Desktop/pack/venv/lib/python3.10/site-packages/mecha/parse.py", line 532, in delegate
        return spec.parsers[parser](stream)
      File "/home/user/Desktop/pack/venv/lib/python3.10/site-packages/mecha/parse.py", line 573, in parse_root
        commands.append(delegate("command", stream))
      File "/home/user/Desktop/pack/venv/lib/python3.10/site-packages/mecha/parse.py", line 532, in delegate
        return spec.parsers[parser](stream)
      File "/home/user/Desktop/pack/venv/lib/python3.10/site-packages/mecha/parse.py", line 638, in parse_command
        argument = delegate("command:argument", stream)
      File "/home/user/Desktop/pack/venv/lib/python3.10/site-packages/mecha/parse.py", line 532, in delegate
        return spec.parsers[parser](stream)
      File "/home/user/Desktop/pack/venv/lib/python3.10/site-packages/mecha/parse.py", line 692, in parse_argument
        return delegate(f"command:argument:{tree.parser}", stream)
      File "/home/user/Desktop/pack/venv/lib/python3.10/site-packages/mecha/parse.py", line 530, in delegate
        raise UnrecognizedParser(parser)
    mecha.parse.UnrecognizedParser: command:argument:minecraft:template_rotation
    

    I have noticed that this does not happen if you leave out the ~ at the end (only place template minecraft:fossil/spine_1).

    opened by 2mal3 2
  • Support Minecraft 1.19

    Support Minecraft 1.19

    This version replaced the /placefeature command with /place <structure | feature | jigsaw> <input> [coords], and replaces /locatebiome and /locate with /locate <structure | poi | biome> <input>. Would love it as I'm thinking about changing to use beet with datapack/resourcepack development, and use the check-commands GitHub action in my CI :P

    opened by osfanbuff63 2
  • chore(deps-dev): bump pyright from 1.1.282 to 1.1.286

    chore(deps-dev): bump pyright from 1.1.282 to 1.1.286

    Bumps pyright from 1.1.282 to 1.1.286.

    Release notes

    Sourced from pyright's releases.

    Published 1.1.286

    Bug Fix: Reverted a recent update to the TOML parser that resulted in a regression. This reversion means that some TOML 1.0 features will not be handled correctly.

    Bug Fix: Fixed a bug that resulted in incorrect handling of literals in the TypeVar constraint solver. This involved a pretty significant change to the constraint solver logic — one that eliminated some heuristics and special cases.

    Bug Fix: Fixed a bug that caused target expressions within a chained assignment to be evaluated in the wrong order (right to left instead of left to right). This resulted in false positives and negatives in some cases where one target referred to another target. This change also makes it illegal to use a Python 2-style type comment on a line containing a chained assignment statement, reflecting the fact that Python 3-style variable type annotations are not legal here either.

    Enhancement: Improved handling of TypeVarTuple constraint solving. Previously, if a TypeVarTuple appeared more than once, the corresponding tuple types needed to be identical. The constraint solver now supports the same sort of narrowing/widening within the tuple entries to find the best solution.

    Bug Fix: Fixed a bug that led to a false negative during protocol matching if the protocol class refers to itself within an invariant type argument.

    Enhancement: Improved handling of generic functions passed as arguments to generic higher-order functions. Pyright is now able to solve the type variables for both the generic callback and the called function.

    Enhancement: Updated typeshed stubs to the latest version.

    Enhancement: Improved handling of generic functions passed as arguments to generic higher-order functions that use a ParamSpec. Pyright is now able to solve the type variables for both the generic callback and the called function.

    Bug Fix: Fixed a bug in the code flow engine that resulted in incorrect type evaluation in some cases involving double nested loops.

    Bug Fix: Improved the method override consistency checks to detect the case where an override uses an *args parameter that is not type compatible with the overridden method's parameter types. Thanks to @​mehdigmira for this contribution.

    Enhancement: Improved handling of TypeVars that appear only within a Callable within a return type annotation for a function. By a strict reading of PEP 484, these should be bound to the function's scope, but practically, they are bound to the Callable. This allows a function to return a generic callable type. When TypeVars are rescoped in this manner, the TypeVar cannot be referenced within the function body because it is no longer in scope in that context.

    Enhancement: Improved error handling for NewType calls

    Enhancement: Completed initial implementation of PEP 696. Added support for default TypeVar types that refer to other TypeVars.

    Published 1.1.285

    Enhancement: Implemented a new --level command-line option that allows filtering of 'information' and 'warning' diagnostics.

    Enhancement: Updated TOML parser to one that is compliant with the TOML 1.0 spec.

    Enhancement: Added logic to detect uses of PEP 604 | syntax that generate exceptions due to runtime limitations. In particular, if one of the operands is a string (i.e. a forward reference) and the other is also a string or a class that is not explicitly specialized, this will result in an exception.

    Bug Fix: Fixed recent regression in completion provider that resulted in garbled type information for a symbol that is declared as a function (using a def statement) but transformed into a non-function type using a decorator.

    Bug Fix: Fixed a bug that resulted in a false positive error when an index expression with a numeric literal subscript was used in a loop that included a del statement targeting the same index expression.

    Behavior Change: Modified the overload matching algorithm to match the behavior of mypy when the overload match is ambiguous because an argument evaluates to Any or Unknown. In this case, the call expression evaluates to Unknown. Previously, pyright used the first of the matching overloads in this case.

    Bug Fix: Fixed a bug that led to extremely long type analysis times when determining type compatibility between an recursive type alias and a recursive protocol.

    Bug Fix (contribution from @​parched): Fixed recent regression that caused reportImportCycles diagnostic reporting to no longer work.

    Bug Fix: Fixed a bug that resulted in a false positive error when a property setter or deleter contained function-scoped type variables.

    Published 1.1.284

    Bug Fix: Fixed a bug that resulted in an incorrect type evaluation when using a literal integer index into a tuple that includes an unpacked TypeVarTuple element.

    Behavior Change: Removed diagnostic check that detects a non-ellipsis default value in a stub file. This check was based on a now-outdated best practice. We now recommend that stubs include default values for better usability in language servers.

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies javascript 
    opened by dependabot[bot] 1
  • chore(deps-dev): bump pyright from 1.1.282 to 1.1.285

    chore(deps-dev): bump pyright from 1.1.282 to 1.1.285

    Bumps pyright from 1.1.282 to 1.1.285.

    Release notes

    Sourced from pyright's releases.

    Published 1.1.285

    Enhancement: Implemented a new --level command-line option that allows filtering of 'information' and 'warning' diagnostics.

    Enhancement: Updated TOML parser to one that is compliant with the TOML 1.0 spec.

    Enhancement: Added logic to detect uses of PEP 604 | syntax that generate exceptions due to runtime limitations. In particular, if one of the operands is a string (i.e. a forward reference) and the other is also a string or a class that is not explicitly specialized, this will result in an exception.

    Bug Fix: Fixed recent regression in completion provider that resulted in garbled type information for a symbol that is declared as a function (using a def statement) but transformed into a non-function type using a decorator.

    Bug Fix: Fixed a bug that resulted in a false positive error when an index expression with a numeric literal subscript was used in a loop that included a del statement targeting the same index expression.

    Behavior Change: Modified the overload matching algorithm to match the behavior of mypy when the overload match is ambiguous because an argument evaluates to Any or Unknown. In this case, the call expression evaluates to Unknown. Previously, pyright used the first of the matching overloads in this case.

    Bug Fix: Fixed a bug that led to extremely long type analysis times when determining type compatibility between an recursive type alias and a recursive protocol.

    Bug Fix (contribution from @​parched): Fixed recent regression that caused reportImportCycles diagnostic reporting to no longer work.

    Bug Fix: Fixed a bug that resulted in a false positive error when a property setter or deleter contained function-scoped type variables.

    Published 1.1.284

    Bug Fix: Fixed a bug that resulted in an incorrect type evaluation when using a literal integer index into a tuple that includes an unpacked TypeVarTuple element.

    Behavior Change: Removed diagnostic check that detects a non-ellipsis default value in a stub file. This check was based on a now-outdated best practice. We now recommend that stubs include default values for better usability in language servers.

    Bug Fix: Fixed recent regression that caused the hover text for a function symbol to be improperly formatted if its type was evaluated to something other than a function.

    Enhancement: Exposed new configuration setting analyzeUnannotatedFunctions which corresponds to the --skipunannotated command-line option. Added an information diagnostic for skipped functions.

    Bug Fix: Fixed bug that resulted in an incorrect target range when resolving the declaration of an import. There were cases where "Go To Declaration" would take you to a location within the target file that corresponded to the offset of the import statement within the importing file.

    Bug Fix: Fixed bugs that resulted in false positive errors when assigning a type to a Callable and when accessing members from a type[T] or a T that is bound to type.

    Enhancement: Improved bidirectional type inference for list, set and dictionary expressions when the "expected type" is a union that contains multiple potentially-compatible subtypes.

    Bug Fix: Fixed a bug that led to a false positive error when evaluating a recursive type alias definition that uses a generic type that is parameterized using a bound or constrained type variable.

    Bug Fix: Added missing diagnostic rule in diagnostics reported as part of the reportImportCycles check. Thanks for @​parched for this fix.

    Bug Fix: Fixed false positive error in multi-inheritance override check in cases where the override symbol was provided by one of the base classes.

    Enhancement: Updated typeshed stubs to the latest version.

    Behavior Change: Added check for disallowed expression forms used with TypeAlias and with PEP 695 type statement.

    Bug Fix (from pylance): Fixed exclude/include to work with '.' prefixed directories.

    Bug Fix: Fixed a bug that led to a false positive when a NoReturn or Never type argument was used for a covariant type parameter.

    Bug Fix: Fixed regression that resulted in inconsistent behavior when useLibraryCodeForTypes is false and a symbol is imported from a non-py.typed library.

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies javascript 
    opened by dependabot[bot] 1
  • chore(deps-dev): bump pyright from 1.1.282 to 1.1.284

    chore(deps-dev): bump pyright from 1.1.282 to 1.1.284

    Bumps pyright from 1.1.282 to 1.1.284.

    Release notes

    Sourced from pyright's releases.

    Published 1.1.284

    Bug Fix: Fixed a bug that resulted in an incorrect type evaluation when using a literal integer index into a tuple that includes an unpacked TypeVarTuple element.

    Behavior Change: Removed diagnostic check that detects a non-ellipsis default value in a stub file. This check was based on a now-outdated best practice. We now recommend that stubs include default values for better usability in language servers.

    Bug Fix: Fixed recent regression that caused the hover text for a function symbol to be improperly formatted if its type was evaluated to something other than a function.

    Enhancement: Exposed new configuration setting analyzeUnannotatedFunctions which corresponds to the --skipunannotated command-line option. Added an information diagnostic for skipped functions.

    Bug Fix: Fixed bug that resulted in an incorrect target range when resolving the declaration of an import. There were cases where "Go To Declaration" would take you to a location within the target file that corresponded to the offset of the import statement within the importing file.

    Bug Fix: Fixed bugs that resulted in false positive errors when assigning a type to a Callable and when accessing members from a type[T] or a T that is bound to type.

    Enhancement: Improved bidirectional type inference for list, set and dictionary expressions when the "expected type" is a union that contains multiple potentially-compatible subtypes.

    Bug Fix: Fixed a bug that led to a false positive error when evaluating a recursive type alias definition that uses a generic type that is parameterized using a bound or constrained type variable.

    Bug Fix: Added missing diagnostic rule in diagnostics reported as part of the reportImportCycles check. Thanks for @​parched for this fix.

    Bug Fix: Fixed false positive error in multi-inheritance override check in cases where the override symbol was provided by one of the base classes.

    Enhancement: Updated typeshed stubs to the latest version.

    Behavior Change: Added check for disallowed expression forms used with TypeAlias and with PEP 695 type statement.

    Bug Fix (from pylance): Fixed exclude/include to work with '.' prefixed directories.

    Bug Fix: Fixed a bug that led to a false positive when a NoReturn or Never type argument was used for a covariant type parameter.

    Bug Fix: Fixed regression that resulted in inconsistent behavior when useLibraryCodeForTypes is false and a symbol is imported from a non-py.typed library.

    Published 1.1.283

    Enhancement: Added support for # pyright: ignore and # type: ignore comments that are not at the start of a comment.

    Enhancement: Improved parse recovery for common indent/dedent conditions.

    Bug Fix: Fixed recent regression that resulted in a false positive when a type[T] was assigned to a Callable[..., T].

    Bug Fix: Fixed a regression related to a recent change in typeshed that caused imports from google.cloud namespace packages to fail.

    Bug Fix: Fixed a bug that resulted in incorrect type evaluation when assigning an unpacked TypeVarTuple to a regular (non-variadic) TypeVar during constraint solving. This should result in a union of the TypeVarTuple types.

    Bug Fix: Fixed a bug that resulted in a false positive diagnostic when importing a symbol from a "py.typed" library that was imported (and re-exported) from a non-"py.typed" library.

    Bug Fix: Changed ParamSpec capture logic to track the expression used for a default argument value.

    Bug Fix: Fixed a recent regression that led to a false negative when evaluating the type of an unannotated variable in a loop.

    Enhancement: Added support for frozen_default for dataclass_transform.

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies javascript 
    opened by dependabot[bot] 1
  • chore(deps): bump beet from 0.81.1 to 0.81.3

    chore(deps): bump beet from 0.81.1 to 0.81.3

    Bumps beet from 0.81.1 to 0.81.3.

    Release notes

    Sourced from beet's releases.

    v0.81.3

    Fix

    • Fast path for eq and id hash for pack objects (0aaf36b)

    v0.81.2

    Fix

    Changelog

    Sourced from beet's changelog.

    v0.81.3 (2022-12-12)

    Fix

    • Fast path for eq and id hash for pack objects (0aaf36b)

    v0.81.2 (2022-12-10)

    Fix

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies python 
    opened by dependabot[bot] 1
  • chore(deps): bump beet from 0.81.1 to 0.81.2

    chore(deps): bump beet from 0.81.1 to 0.81.2

    Bumps beet from 0.81.1 to 0.81.2.

    Release notes

    Sourced from beet's releases.

    v0.81.2

    Fix

    Changelog

    Sourced from beet's changelog.

    v0.81.2 (2022-12-10)

    Fix

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies python 
    opened by dependabot[bot] 1
  • chore(deps-dev): bump pyright from 1.1.282 to 1.1.283

    chore(deps-dev): bump pyright from 1.1.282 to 1.1.283

    Bumps pyright from 1.1.282 to 1.1.283.

    Release notes

    Sourced from pyright's releases.

    Published 1.1.283

    Enhancement: Added support for # pyright: ignore and # type: ignore comments that are not at the start of a comment.

    Enhancement: Improved parse recovery for common indent/dedent conditions.

    Bug Fix: Fixed recent regression that resulted in a false positive when a type[T] was assigned to a Callable[..., T].

    Bug Fix: Fixed a regression related to a recent change in typeshed that caused imports from google.cloud namespace packages to fail.

    Bug Fix: Fixed a bug that resulted in incorrect type evaluation when assigning an unpacked TypeVarTuple to a regular (non-variadic) TypeVar during constraint solving. This should result in a union of the TypeVarTuple types.

    Bug Fix: Fixed a bug that resulted in a false positive diagnostic when importing a symbol from a "py.typed" library that was imported (and re-exported) from a non-"py.typed" library.

    Bug Fix: Changed ParamSpec capture logic to track the expression used for a default argument value.

    Bug Fix: Fixed a recent regression that led to a false negative when evaluating the type of an unannotated variable in a loop.

    Enhancement: Added support for frozen_default for dataclass_transform.

    Bug Fix: Fixed recent regression that caused a false positive reportShadowedStdlibModules for relative imports and imports starting with _.

    Enhancement: Show doc strings on hover over module names within import statements.

    Enhancement: Updated typeshed stubs to the latest version.

    Enhancement: Added small perf optimization for determining type compatibility between two unions, especially in cases where the number of items in the union is large.

    Bug Fix: Added logic to limit recursion when handling type compatibility checks between two different recursive type aliases that have the same definition.

    Bug Fix: Fixed bug that resulted in a false positive when passing an unpacked dict or unpacked iterable argument to the constructor of a class that has no __init__ and therefore uses object.__init__.

    Bug Fix: Fixed bug that led to a false positive error when using an unpacked argument that has a declared type that is a tuple with an unpacked TypeVarTuple.

    Bug Fix: Fixed bug that resulted in a false positive reportPrivateImportUsage diagnostic when importing from a py.typed library under certain circumstances.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies javascript 
    opened by dependabot[bot] 1
  • chore(deps-dev): bump pyright from 1.1.280 to 1.1.281

    chore(deps-dev): bump pyright from 1.1.280 to 1.1.281

    Bumps pyright from 1.1.280 to 1.1.281.

    Release notes

    Sourced from pyright's releases.

    Published 1.1.281

    Enhancement: Improved parse recovery for ternary expressions that are missing an else or a post-else expression.

    Enhancement: Changed the implicit declared type of a module-scoped doc to be str instead of str | None when a docstring is present at the top of the module.

    Bug Fix: Fixed a bug that resulted in incorrect type evaluation when dealing with a union of an unpacked TypeVarTuple.

    Bug Fix: Fixed bug that resulted in incorrect type evaluation when dealing with a union of an unpacked TypeVarTuple.

    Bug Fix: Fixed a bug that resulted in incorrect type evaluation when applying a solved unpacked TypeVarTuple in a Union.

    Bug Fix: Fixed a bug that resulted in a false positive during protocol matching for a protocol that includes a property with a getter whose self parameter is annotated with a TypeVar.

    Bug Fix: Fixed a bug that resulted in sporadic type evaluation errors when a quoted (forward-declared) type was used in a statement with an explicit PEP-613 TypeAlias annotation.

    Bug Fix: Fixed bug that resulted in false positive errors when doing protocol matching for a recursive protocol definition. I needed to increase an internal recursion limit to support this.

    Enhancement: Updated typeshed stubs to the latest.

    Bug Fix: Fixed regression that resulted in errant reportMissingImports diagnostics within stub files.

    Enhancement: Improved parse recovery when a suite contains an unexpected indent followed by a dedent that restores the indentation to that of the suite's body.

    Bug Fix: Fixed a bug in the evaluation of the "with" statement that resulted in a false positive error when a class implements a context manager via its metaclass.

    Bug Fix: Fixed a bug that led to a false positive error when validating the variance of type parameters for a protocol class when a covariant type parameter is used in a return type in the form type[T_co].

    Bug Fix: Fixed a bug that resulted in a false positive error when using a cast to a TypeVar.

    Bug Fix: Fixed a bug in the type evaluator that could lead to unsolved TypeVars if used in a Callable parameter.

    Bug Fix: Fixed recent regression that led to false positive reportUnnecessaryCast diagnostics.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies javascript 
    opened by dependabot[bot] 1
  • chore(deps): bump beet from 0.79.2 to 0.80.1

    chore(deps): bump beet from 0.79.2 to 0.80.1

    Bumps beet from 0.79.2 to 0.80.1.

    Release notes

    Sourced from beet's releases.

    v0.80.1

    Fix

    • Expose project_directory and broadcast_directory to templates (779ca95)

    v0.80.0

    Feature

    • Fetch external objects using asset index (3e7d9b5)
    Changelog

    Sourced from beet's changelog.

    v0.80.1 (2022-11-21)

    Fix

    • Expose project_directory and broadcast_directory to templates (779ca95)

    v0.80.0 (2022-11-16)

    Feature

    • Fetch external objects using asset index (3e7d9b5)
    Commits
    • 60266ad 0.80.1
    • 779ca95 fix: expose project_directory and broadcast_directory to templates
    • b288786 chore(deps-dev): bump pyright from 1.1.279 to 1.1.280
    • a41f8a4 chore(deps): bump pathspec from 0.10.1 to 0.10.2
    • 149ae34 0.80.0
    • 3e7d9b5 feat: fetch external objects using asset index
    • 6b67d4e chore(deps): bump pillow from 9.2.0 to 9.3.0
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies python 
    opened by dependabot[bot] 1
  • chore(deps): bump beet from 0.79.2 to 0.80.0

    chore(deps): bump beet from 0.79.2 to 0.80.0

    Bumps beet from 0.79.2 to 0.80.0.

    Release notes

    Sourced from beet's releases.

    v0.80.0

    Feature

    • Fetch external objects using asset index (3e7d9b5)
    Changelog

    Sourced from beet's changelog.

    v0.80.0 (2022-11-16)

    Feature

    • Fetch external objects using asset index (3e7d9b5)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies python 
    opened by dependabot[bot] 1
  • chore(deps-dev): bump pyright from 1.1.282 to 1.1.287

    chore(deps-dev): bump pyright from 1.1.282 to 1.1.287

    Bumps pyright from 1.1.282 to 1.1.287.

    Release notes

    Sourced from pyright's releases.

    Published 1.1.287

    Bug Fix: Fixed false positive error in parser when an assignment expression (walrus operator) is used in a subscript list without parentheses. This was a syntax error in Python 3.8 and 3.9 but is allowed in 3.10 and newer.

    Bug Fix: Fixed regression that caused an incorrect type evaluation in the presence of a doubly-nested loop.

    Bug Fix: Fixed bug that sometimes resulted in incorrect type evaluation of tuple expressions used within a loop.

    Bug Fix: Fixed a bug in the import cycle detection logic that led to some false negatives.

    Enhancement: Addressed type evaluation performance issue by eliminating separate "incomplete type cache" and combining it with the primary type cache.

    Enhancement: Improved error reporting for type mismatch involving a return type that is a TypedDict.

    Bug Fix: Fixed a bug that resulted in a false positive error when resolving nested overloaded function calls where the correct overload match depends on bidirectional type inference.

    Published 1.1.286

    Bug Fix: Reverted a recent update to the TOML parser that resulted in a regression. This reversion means that some TOML 1.0 features will not be handled correctly.

    Bug Fix: Fixed a bug that resulted in incorrect handling of literals in the TypeVar constraint solver. This involved a pretty significant change to the constraint solver logic — one that eliminated some heuristics and special cases.

    Bug Fix: Fixed a bug that caused target expressions within a chained assignment to be evaluated in the wrong order (right to left instead of left to right). This resulted in false positives and negatives in some cases where one target referred to another target. This change also makes it illegal to use a Python 2-style type comment on a line containing a chained assignment statement, reflecting the fact that Python 3-style variable type annotations are not legal here either.

    Enhancement: Improved handling of TypeVarTuple constraint solving. Previously, if a TypeVarTuple appeared more than once, the corresponding tuple types needed to be identical. The constraint solver now supports the same sort of narrowing/widening within the tuple entries to find the best solution.

    Bug Fix: Fixed a bug that led to a false negative during protocol matching if the protocol class refers to itself within an invariant type argument.

    Enhancement: Improved handling of generic functions passed as arguments to generic higher-order functions. Pyright is now able to solve the type variables for both the generic callback and the called function.

    Enhancement: Updated typeshed stubs to the latest version.

    Enhancement: Improved handling of generic functions passed as arguments to generic higher-order functions that use a ParamSpec. Pyright is now able to solve the type variables for both the generic callback and the called function.

    Bug Fix: Fixed a bug in the code flow engine that resulted in incorrect type evaluation in some cases involving double nested loops.

    Bug Fix: Improved the method override consistency checks to detect the case where an override uses an *args parameter that is not type compatible with the overridden method's parameter types. Thanks to @​mehdigmira for this contribution.

    Enhancement: Improved handling of TypeVars that appear only within a Callable within a return type annotation for a function. By a strict reading of PEP 484, these should be bound to the function's scope, but practically, they are bound to the Callable. This allows a function to return a generic callable type. When TypeVars are rescoped in this manner, the TypeVar cannot be referenced within the function body because it is no longer in scope in that context.

    Enhancement: Improved error handling for NewType calls

    Enhancement: Completed initial implementation of PEP 696. Added support for default TypeVar types that refer to other TypeVars.

    Published 1.1.285

    Enhancement: Implemented a new --level command-line option that allows filtering of 'information' and 'warning' diagnostics.

    Enhancement: Updated TOML parser to one that is compliant with the TOML 1.0 spec.

    Enhancement: Added logic to detect uses of PEP 604 | syntax that generate exceptions due to runtime limitations. In particular, if one of the operands is a string (i.e. a forward reference) and the other is also a string or a class that is not explicitly specialized, this will result in an exception.

    Bug Fix: Fixed recent regression in completion provider that resulted in garbled type information for a symbol that is declared as a function (using a def statement) but transformed into a non-function type using a decorator.

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies javascript 
    opened by dependabot[bot] 0
  • chore(deps): bump beet from 0.81.1 to 0.82.1

    chore(deps): bump beet from 0.81.1 to 0.82.1

    Bumps beet from 0.81.1 to 0.82.1.

    Release notes

    Sourced from beet's releases.

    v0.82.1

    Fix

    • Don't use field_map to figure out if generated files should go in the resource pack or data pack (e69cf14)

    v0.82.0

    Feature

    Fix

    • Use merge policy when merging proxy (412fd65)

    v0.81.3

    Fix

    • Fast path for eq and id hash for pack objects (0aaf36b)

    v0.81.2

    Fix

    Changelog

    Sourced from beet's changelog.

    v0.82.1 (2022-12-29)

    Fix

    • Don't use field_map to figure out if generated files should go in the resource pack or data pack (e69cf14)

    v0.82.0 (2022-12-29)

    Feature

    Fix

    • Use merge policy when merging proxy (412fd65)

    v0.81.3 (2022-12-12)

    Fix

    • Fast path for eq and id hash for pack objects (0aaf36b)

    v0.81.2 (2022-12-10)

    Fix

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies python 
    opened by dependabot[bot] 0
Releases(v0.62.0)
Owner
The Minecraft pack development kit.
Todo list console based application. Todo's save to a seperate file.

Todo list console based application. Todo's save to a seperate file.

1 Dec 24, 2021
A python CLI app that converts a mp4 file into a gif with ASCII effect added.

Video2ASCIIgif This CLI app takes in a mp4 format video, converts it to a gif with ASCII effect applied. This also includes full control over: backgro

Sriram R 6 Dec 31, 2021
CLI translator based on Google translate API

Translate-CLI CLI переводчик основанный на Google translate API как пользоваться ? запустить в консоли скомпилированный скрипт (exe - windows, bin - l

7 Aug 13, 2022
Darkdump - Search The Deep Web Straight From Your Terminal

Darkdump - Search The Deep Web Straight From Your Terminal About Darkdump Darkdump is a simple script written in Python3.9 in which it allows users to

Josh Schiavone 264 Dec 30, 2022
A Python module and command-line utility for converting .ANS format ANSI art to HTML

ansipants A Python module and command-line utility for converting .ANS format ANSI art to HTML. Installation pip install ansipants Command-line usage

4 Oct 16, 2022
A simple command line tool for changing the icons of folders or files on MacOS.

Mac OS File Icon Changer Description A small and simple script to quickly change large amounts or a few files and folders icons to easily customize th

Eroxl 3 Jan 02, 2023
A Python command-line utility for validating that the outputs of a given Declarative Form Azure Portal UI JSON template map to the input parameters of a given ARM Deployment Template JSON template

A Python command-line utility for validating that the outputs of a given Declarative Form Azure Portal UI JSON template map to the input parameters of a given ARM Deployment Template JSON template

Glenn Musa 1 Feb 03, 2022
CLI para o projeto Compilado (Newsletter e Podcast do Código Fonte TV)

Compilado CLI Automatização de tarefas através de linha de comando para a geração de assets para episódios do Compilado, a newsletter e podcast do can

Gabriel Froes 18 Nov 21, 2022
Display Images in your terminal with python

Term-Img Display Images in your terminal with python NOTE: This project is a work in progress and not everything on here has actually been implemented

My avatar ;D 118 Jan 05, 2023
A small system that allow you to manage hosts stored in your .ssh/config file

A small system that allow you to manage hosts stored in your .ssh/config using simple commands.

Simone Ostini 1 Jan 24, 2022
Enriches Click with option groups, constraints, command aliases, help sections for subcommands, themes for --help and other stuff.

Enriches Click with option groups, constraints, command aliases, help sections for subcommands, themes for --help and other stuff.

Gianluca Gippetto 62 Dec 22, 2022
Bonjour Software pypahe is a Python Package Helper command-line tool.

pypahe Bonjour Software pypahe is a Python Package Helper command-line tool. Requirements Docker runtime Usage print the latest available version of a

Bonjour Software 0 Aug 10, 2021
A tool to manage the study of courses at the university.

todo-cli A tool to manage the study of courses at the university

Quentin 6 Aug 01, 2022
A basic molecule viewer written in Python, using curses; Thus, meant for linux terminals

asciiMOL A basic molecule viewer written in Python, using curses; Thus, meant for linux terminals. This is an alpha version, featuring: Opening defaul

Dominik Behrens 328 Dec 11, 2022
This is my fetch, with ascii arts from neofetch and internet

deadfetch This is my fetch, with ascii arts from neofetch and internet Installation First what you need its python Fedora sudo dnf install python3 sud

DedSec 8 Jan 20, 2022
Automaton - python script to execute bash command based on changes in size of a file.

automaton python script to execute given command = everytime size of a given file changes,hence everytime a file is modified.(almost) download automa

asrar bhat 1 Jan 03, 2022
A CLI application for storing contacts as a csv file written in Python.

Contacter A CLI application for storing contacts as a csv file written in Python. You can use this to save your contacts with a special relations tag

nostalgicnerdpenguin 1 Oct 23, 2021
🌈 Generate color palettes based on Neovim colorschemes.

Iris Iris is a Neovim plugin that generates a normalized color palette based on your colorscheme. It is named for the goddess Iris of Greek mythology,

N. G. Scheurich 45 Jul 28, 2022
Wordle-cli - Command-line clone of Josh Wardle's WORDLE

Command-line clone of Josh Wardle's WORDLE, inspired by Paul Battley's Ruby vers

Klipspringer 32 Jan 03, 2023
A simple CLI productivity tool to quickly display the syntax of a desired piece of code

Iforgor Iforgor is a customisable and easy to use command line tool to manage code samples. It's a good way to quickly get your hand on syntax you don

Solaris 21 Jan 03, 2023