Git Product home page Git Product logo

Comments (4)

lyz-code avatar lyz-code commented on September 25, 2024

Hi @kbauer, thanks for opening the issue,

I've solved it in #71 and released under version 0.6.0.

Cheers

from autoimport.

kbauer avatar kbauer commented on September 25, 2024

@lyz-code That was fast :)

However the fix might make too many assumptions. E.g.:

#!/usr/bin/env python3
# -*- coding: latin-1 -*-

# pylint: disable=foobar

"""

This is the docstring.

"""

import sys

print(os.path.exists(sys.argv[1]))

becomes

#!/usr/bin/env python3
# -*- coding: latin-1 -*-

import sys
import os

# pylint: disable=foobar

"""

This is the docstring.

"""


print(os.path.exists(sys.argv[1]))

Diff:
image

Apparently, autoimport also removes the trailing newline, which git isn't happy about.

from autoimport.

lyz-code avatar lyz-code commented on September 25, 2024

Hi, I see your points, I'll fix them tomorrow.

Regarding the trailing newline, I did it to be compliant with the pre-commit hook, but I understand that, it's something that should be handled by other tools, so I'll respect trailing newlines at the end of the file.

Thanks!

from autoimport.

lyz-code avatar lyz-code commented on September 25, 2024

@kbauer Fixed in #72 and released under 0.6.1. If you find any other case, do not hesitate to reopen it

from autoimport.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.