Skip to content
This repository was archived by the owner on Dec 23, 2024. It is now read-only.

Conversation

@kai3341
Copy link
Contributor

@kai3341 kai3341 commented Dec 18, 2022

It's too difficult to read this code. I simplified if

@kai3341
Copy link
Contributor Author

kai3341 commented Dec 18, 2022

It looks it's first step of refactoring. Now it's easy to see:
-- channel_id at Client.fetch_peers uses only in one case but calculates always. Maybe it would be good idea to put its calculation exactly there where it used
-- maybe instead of getattr(..., ..., None) or getattr(..., ..., None) it would be good idea to use getattr(..., ..., getattr(..., ..., None))
-- maybe invert getattr action order
-- maybe extract attr via type checking

@kai3341
Copy link
Contributor Author

kai3341 commented Dec 19, 2022

I found patchy so I'm solving my issues
@delivrance you may close this PR. It change nothing in behavior

@kai3341 kai3341 changed the title Refactor at Client.fetch_peers extraction channel_id [WIP] Refactor at Client.fetch_peers extraction channel_id Dec 24, 2022
@kai3341
Copy link
Contributor Author

kai3341 commented Dec 24, 2022

I have some ideas, so I'll implement it, push it and then remove WIP status

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant