profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/lyz-code/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

lyz-code/blue-book 128

My personal knowledge repository

lyz-code/autoimport 33

Autoimport automatically fixes wrong import statements.

lyz-code/clinv 15

DevSecOps command line asset inventory tool

lyz-code/cookiecutter-python-project 3

Cookiecutter template to generate python projects following the best practices gathered over the time.

lyz-code/faker-optional 3

Wrapper over other Faker providers to return their value or None.

lyz-code/bruty 2

Bruteforce dynamic web applications with Selenium

lyz-code/cookiecutter 1

A command-line utility that creates projects from cookiecutters (project templates), e.g. Python package projects, VueJS projects.

lyz-code/drode 1

`drode` is a wrapper over the Drone and AWS APIs to make deployments more user friendly.

lyz-code/airss-dl 0

Airss downloader

push eventlyz-code/blue-book

lyz-code

commit sha 3f1fd851873da5893fc080a00454a9593937b5fa

deploy: 3829351b81f9b5137e0b897393157239d278a779

view details

push time in 9 hours

push eventlyz-code/life

lyz-code

commit sha 8c217231fa7556ed512a023e64cd591447b8164a

deploy: f561da3c996444e0d36511fe3276ccbb55569769

view details

push time in 9 hours

push eventlyz-code/blue-book

lyz-code

commit sha 48e53fe0ce1e61d53f34eff76be35a9ddc0b5f5c

deploy: 3829351b81f9b5137e0b897393157239d278a779

view details

push time in a day

push eventlyz-code/blue-book

lyz-code

commit sha faf6c84699b4ae0634f9c21220e5f4b19803eab3

deploy: 9d8ac154b0ca67044fe8b5da92120128071c4a14

view details

push time in 2 days

push eventlyz-code/blue-book

lyz-code

commit sha 5cb625710231810b435ea40ebf8d043c2bf56749

deploy: 9d8ac154b0ca67044fe8b5da92120128071c4a14

view details

push time in 3 days

push eventlyz-code/blue-book

lyz-code

commit sha d4b3704136b111ea8310102ca2a8b4d2e6668df6

deploy: 003b5050d10e5c93d3e359d6876a4cd74b6dd138

view details

push time in 4 days

push eventlyz-code/blue-book

lyz-code

commit sha 9aaa174459e09508dc583a43fbb0c065ee6c6587

deploy: 471600315b2d4efff03ab9b94b1c0f23f0638ee6

view details

push time in 5 days

push eventlyz-code/blue-book

lyz-code

commit sha 6f46b4997c8d61afdef1d5b91506e26bded71c86

deploy: 4c7d58bf9093461019f6500a51df995f1d691114

view details

push time in 6 days

push eventlyz-code/blue-book

lyz-code

commit sha 57475e2f96f17777449ed75909c26007799a9f38

deploy: aa80983902b5643fc9a51687f7c6cc8d22a1beed

view details

push time in 7 days

push eventlyz-code/blue-book

lyz-code

commit sha 0fb3b7c776fb63ac6e5263ca0637ffa432ba4e7b

deploy: d1326ab3cbded81a06e3072bd68aa2f5fae5329f

view details

push time in 8 days

issue commentlyz-code/autoimport

Feature request: ability to run autoimport on a directory

autoimport accepts many files though, so if you're in a directory, you can do autoimport *.py. But it won't recursively search in the subdirectories, which would be ideal

Jasha10

comment created time in 9 days

issue commentlyz-code/autoimport

Feature request: ability to run autoimport on a directory

Hi @Jasha10, thanks for taking the time to open the issue, the behaviour described makes all the sense. Sadly, I won't be able to look into it this month as I'm a little bit overloaded.

If you can't wait and have coding skills and some time, feel free to make a pull request.

Jasha10

comment created time in 9 days

issue commentlyz-code/yamlfix

YAML with anchors and aliases is broken

Hi @systemmonkey42, thanks for taking the time to open the issue. Sadly, I won't be able to look into it this month as I'm a little bit overloaded, maybe one of the other maintainers can jump in.

If you can't wait and have coding skills and some time, feel free to make a pull request.

systemmonkey42

comment created time in 9 days

Pull request review commentlyz-code/autoimport

Avoid IndexError when extracting typing statements

 def test_fix_doesnt_fail_on_empty_file() -> None:     result = fix_code(source)      assert result == source+++def test_file_that_only_has_unused_imports() -> None:+    """+    Given: A file that only has unused imports.+    When: Fix code is run.+    Then: The output should be a single empty line.+    """+    source = dedent(+        """\+        import os+        import sys+        """+    )++    result = fix_code(source)++    assert result == "\n"+++def test_file_that_only_has_unused_imports_with_no_qa() -> None:+    """+    Given: A file that has unused imports, but one marked with noqa.+    When: Fix code is run.+    Then: The output should be only the import marked with noqa.+    """+    source = dedent(+        """\+        import os  # noqa: F401

Sorry for taking so long in answering, it's not being a good month for me.

autoimport does more things than flake8/pyflakes, for example moving imports to the top, that behaviour is not covered by any existing annotation, that's why we introduced our own. I agree with you that it should respect flake8 annotations though, so I'd say you've found even another bug xD.

If you analyze the flow of the test with pdb you'll see that pyflakes is showing errors on both imports, (even the one that has the F401). Put a trace between lines 246 and 247 of src/autoimport/model.py, maybe it adds a property or something where we can tell apart the errors that have been ignored with annotations

fsouza

comment created time in 9 days

PullRequestReviewEvent

push eventlyz-code/blue-book

lyz-code

commit sha ba1c47496fe28c42460c1aa0715fc594856d2055

deploy: 59c01da8b91bab4b3bed906c803f46a1e2d48d97

view details

push time in 9 days

push eventlyz-code/blue-book

lyz-code

commit sha 979ce538d20de21fd79464e6ae50d4334516709d

deploy: 2ea464a40584ae9e72366c10ed3ad411322d617e

view details

push time in 10 days

push eventlyz-code/blue-book

lyz-code

commit sha d575671f5e4eab4a9001540ebc007902d29ddb20

deploy: f1a86deda95e9dcd8b3b3bd77bcc94fe68d169f9

view details

push time in 11 days

push eventlyz-code/life

lyz-code

commit sha 046e44c7035e2e5c727810263d7a26f2b81a40ca

deploy: f561da3c996444e0d36511fe3276ccbb55569769

view details

push time in 11 days

push eventlyz-code/blue-book

lyz-code

commit sha 5ed6cc46909c1be09d65ecf91d672abc1023afda

deploy: 6e3278aebf8cccfe6b92ab8dd3a52f188796aee3

view details

push time in 12 days

push eventlyz-code/life

lyz-code

commit sha ffd6a51dbe3d6a86a90f7be625f2fc39235d3f0b

deploy: f561da3c996444e0d36511fe3276ccbb55569769

view details

push time in 12 days

push eventlyz-code/blue-book

lyz-code

commit sha 094cb57cc74c07db955119774cd601073dce7134

deploy: fb46211fb5757cfb74c4065abbf63b7614ca3c19

view details

push time in 13 days

push eventlyz-code/life

lyz-code

commit sha d3281ed0903d358b0bba10bc45900cc3a5507ed1

deploy: c1bd50a75f3618371e09395c7440564b29ffabfb

view details

push time in 13 days

push eventlyz-code/blue-book

lyz-code

commit sha 6b2cbd21d39005af6abddf647ac0b69b8da0db6f

deploy: fb46211fb5757cfb74c4065abbf63b7614ca3c19

view details

push time in 14 days

push eventlyz-code/life

lyz-code

commit sha 39327f654cf5ef981f10ff48a486494ee417fa90

deploy: c1bd50a75f3618371e09395c7440564b29ffabfb

view details

push time in 14 days

push eventlyz-code/yamlfix

muripic

commit sha fb61d8e5e9e17e140c43d11a323fcbc0ec4958ab

deploy: e7fe1894715a11e9dd48f27007109100923b024c

view details

push time in 15 days

push eventlyz-code/yamlfix

muripic

commit sha 0406f7dd300a2b88e6471353851b8cc3ab887b81

deploy: 6d22bc3a197c987e22c7c43da65f219a48199e1b

view details

push time in 15 days

Pull request review commentlyz-code/autoimport

Avoid IndexError when extracting typing statements

 def test_fix_doesnt_fail_on_empty_file() -> None:     result = fix_code(source)      assert result == source+++def test_file_that_only_has_unused_imports() -> None:+    """+    Given: A file that only has unused imports.+    When: Fix code is run.+    Then: The output should be a single empty line.+    """+    source = dedent(+        """\+        import os+        import sys+        """+    )++    result = fix_code(source)++    assert result == "\n"+++def test_file_that_only_has_unused_imports_with_no_qa() -> None:+    """+    Given: A file that has unused imports, but one marked with noqa.+    When: Fix code is run.+    Then: The output should be only the import marked with noqa.+    """+    source = dedent(+        """\+        import os  # noqa: F401

I'd suggest to either change F401 to autoimport, or even better, if you have time and want to, check why _remove_unused_imports is not working as expected and fix it

fsouza

comment created time in 15 days

PullRequestReviewEvent

Pull request review commentlyz-code/autoimport

Avoid IndexError when extracting typing statements

 def test_fix_doesnt_fail_on_empty_file() -> None:     result = fix_code(source)      assert result == source+++def test_file_that_only_has_unused_imports() -> None:+    """+    Given: A file that only has unused imports.+    When: Fix code is run.+    Then: The output should be a single empty line.+    """+    source = dedent(+        """\+        import os+        import sys+        """+    )++    result = fix_code(source)++    assert result == "\n"+++def test_file_that_only_has_unused_imports_with_no_qa() -> None:+    """+    Given: A file that has unused imports, but one marked with noqa.+    When: Fix code is run.+    Then: The output should be only the import marked with noqa.+    """+    source = dedent(+        """\+        import os  # noqa: F401

The line should also be removed, as it's not using # noqa: autoimport, so you've found another bug xD

fsouza

comment created time in 15 days