Giter VIP home page Giter VIP logo

Comments (7)

mishamsk avatar mishamsk commented on May 27, 2024 1

This is a good point. I personally got used to run all linters separately on my laptop but this needs to be automated. I’ll handle this.

I've recently started using taskfile (e.g. here is one of them - most of the cleanup is via pre-commit which is also called from GitHub action). Taskfile is pretty nice and easy to write tasks (I have much more complicated stuff in private repos), although one think I miss that just has - ability to pass arbitrary args without -- .... So both options seems great, especially compared with Makefile...

from mashumaro.

Fatal1ty avatar Fatal1ty commented on May 27, 2024 1

P.S. I'd say a just/taskfile/make with a command to run the preferred linting that would match CI test would be cool!

On your request https://github.com/Fatal1ty/mashumaro/blob/master/justfile

P.S. Sadly, it seems like zsh completions work only for the first recipe. When I type the first letter of the second recipe, I don't see any suggestions on ⇥ Tab.

from mashumaro.

Fatal1ty avatar Fatal1ty commented on May 27, 2024

I was surprised that this has not been asked before, it seems a very natural thing to me.

In my experience ignoring extra keys is a blessing in scenarios when you want to be forward compatible. Maybe, I’m not the only one in this boat, so this may explain why this feature hasn’t been requested yet :)

Actually, the first one who wanted to forbid extra keys was @mishamsk, and we are waiting for him to split his valuable pull request #183 (comment) that will probably resolve this issue.

Meanwhile, I have a list of tasks that need to be solved by the next release (and #42 is one of them). However, if this is a blocker for you, I might consider implementing it myself or taking the PR from @mishamsk as a basis if he doesn’t mind. At least we now have this feature request documented :)

from mashumaro.

mishamsk avatar mishamsk commented on May 27, 2024

hey all. I wrote a long comment why I won't be able to split that until April and then it got boring and I just split the code. Hopefully now you'll be ok to merge one or both of the PRs.

P.S. I'd say a just/taskfile/make with a command to run the preferred linting that would match CI test would be cool!

from mashumaro.

Fatal1ty avatar Fatal1ty commented on May 27, 2024

@mishamsk Welcome back! I will look into this as soon as possible, most likely this week.

P.S. I'd say a just/taskfile/make with a command to run the preferred linting that would match CI test would be cool!

This is a good point. I personally got used to run all linters separately on my laptop but this needs to be automated. I’ll handle this.

from mashumaro.

real-or-random avatar real-or-random commented on May 27, 2024

@mishamsk Nice to see a PR. :) I had missed your (now closed) PR because I only searched through issues...

In my experience ignoring extra keys is a blessing in scenarios when you want to be forward compatible.

This made me think. I assume one common thing that applications may want to do is ignore but not silently, i.e., issue a warning to the user or write into the log file.

In fact, that's true for other errors, too. One general approach is to ignore errors (e.g., skip invalid values and extra keys) but record them into a list of exceptions and finish parsing to the end. Then at the end, if they were errors, throw an exception and include the parsed object in the exception, and the list of other exceptions. This does the right thing in the sense that it raises a real error if the user asks for it, but the caller can still continue. But the approach is pretty heavy, possibly too much for this kind of library (and certainly not to be included in the current PR).

Sorry for throwing so many suggestions at you... ^^ These are really rather just my ideas, not things that I'd need.

from mashumaro.

mishamsk avatar mishamsk commented on May 27, 2024

P.S. I'd say a just/taskfile/make with a command to run the preferred linting that would match CI test would be cool!

On your request https://github.com/Fatal1ty/mashumaro/blob/master/justfile

P.S. Sadly, it seems like zsh completions work only for the first recipe. When I type the first letter of the second recipe, I don't see any suggestions on ⇥ Tab.

awesome. completions or not!

from mashumaro.

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.