Coder Social home page Coder Social logo

Refactoring about i3-agenda HOT 4 CLOSED

rosenpin avatar rosenpin commented on May 29, 2024
Refactoring

from i3-agenda.

Comments (4)

matclab avatar matclab commented on May 29, 2024

A quick browsing does not show me function needing refactoring because of complexity.
@rosenpin, do you have some in mind ?

from i3-agenda.

matclab avatar matclab commented on May 29, 2024

Please tell me if you think something else shall be done.

Before taking maintenance, I'd also like to add more testing (I quickly began with human_delta which chocked:

    def test_human_delta():
        assert human_delta(dt.timedelta(0)) == "0m"
        assert human_delta(dt.timedelta(minutes=1)) == "1m"
>       assert human_delta(dt.timedelta(hours=1)) == "1h"
E       AssertionError: assert '0m' == '1h'
E         - 1h
E         + 0m

).

I'll open a new PR based upon #89 for tests.

from i3-agenda.

rosenpin avatar rosenpin commented on May 29, 2024

Great find
I'll look into the PR and comment on everything once I get a chance (hopefully next few days)
Thanks!

from i3-agenda.

rosenpin avatar rosenpin commented on May 29, 2024

A quick browsing does not show me function needing refactoring because of complexity. @rosenpin, do you have some in mind ?

As a general rule, as mentioned in the issue description

Separate functions with 3+ indentation levels or over 15 lines

Some example I found include

  • get_credentials
  • get_callendar_ids
  • get_all_events
  • get_events_from_cache
  • get_string
  • get_future_events

from i3-agenda.

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.