question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

It would be good if vermin can export a module-level function that accepts a code string and reports its minimum version. This allows programmatic use of vermin in Python without having to invoke the CLI.

In fact, I’m occasionally using one of your test utility functions to run vermin against short code snippets in IPython without having to create a file to store the code. However this function is in the tests package and thus is not accessible from the vermin package. Also, this test function only returns the minimum version of the code. Where to report details of each rule matched and other tips (like “You’re using potentially backported modules”) is a problem.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
netromdkcommented, Oct 9, 2020

I will expose the visit() as well. And it is the plan to do a parsable output once the format is agreed upon.

You can actually use the config already now with detect():

>>> import vermin as V
>>> V.detect("a = long(1)")
[(2, 0), None]
>>> c = V.Config.get()
>>> c.add_exclusion("long")
>>> V.detect("a = long(1)")
[(0, 0), (0, 0)]
1reaction
gousaiyangcommented, Oct 9, 2020

It’s good if the initial version only returns the minimum versions. Detail reporting may be considered in the future.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python API Tutorial: Getting Started with APIs - Dataquest
An API, or Application Programming Interface, is a server that you can use to retrieve and send data to using code. APIs are...
Read more >
Python/C API Reference Manual — Python 3.11.1 ...
This manual documents the API used by C and C++ programmers who want to write extension modules or embed Python. It is a...
Read more >
Python & APIs: A Winning Combo for Reading Public Data
API stands for application programming interface. In essence, an API acts as a communication layer, or as the name says, an interface, that...
Read more >
How to use an API with Python (Beginner's Guide) - RapidAPI
An API (Application Programming Interface) is a set of rules that are shared by a particular service. These rules determine in which format...
Read more >
Quick-Fire Guide to APIs in Python - Towards Data Science
In this introduction to APIs in Python we will learn what an API is, the definition of REST and JSON. And how to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found