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

does not remove annotation from conditional inner function #96

Open
wrohdewald opened this issue Oct 28, 2023 · 2 comments
Open

does not remove annotation from conditional inner function #96

wrohdewald opened this issue Oct 28, 2023 · 2 comments

Comments

@wrohdewald
Copy link

def ruleset(self, value:str) ->None:
    if True:
        def write() ->str:
            return 'update'

returns

def ruleset(self,value):
        if True:
                def A()->str:return'update'

expected

def ruleset(self,value):
        if True:
                def A():return'update'
@dflook
Copy link
Owner

dflook commented Oct 28, 2023

Hi @wrohdewald, what version of python-minifier are you using and with what options? With 2.9.0 I do get:

def ruleset(self,value):
	if True:
		def A():return'update'

@wrohdewald
Copy link
Author

Python 3.11.2 on Debian Bookworm, and

wrpc:/usr/local/lib/python3.11/dist-packages/python_minifier# pip3 list | grep mini
python-minifier     2.9.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants