Skip to content

Removed unused vars and imports in ripper#2178

Open
yashraj0902 wants to merge 1 commit into
RipMeApp:mainfrom
yashraj0902:fix-packs
Open

Removed unused vars and imports in ripper#2178
yashraj0902 wants to merge 1 commit into
RipMeApp:mainfrom
yashraj0902:fix-packs

Conversation

@yashraj0902

Copy link
Copy Markdown

Removed unused local variables and imports identified by the IDE.

These changes do not affect functionality and are intended to improve code cleanliness and readability.

public void testGetGalleryIDAndUsername() throws IOException, URISyntaxException {
URL url = new URI("https://www.deviantart.com/airgee/gallery/").toURL();
DeviantartRipper ripper = new DeviantartRipper(url);
Document doc = Http.url(url).get();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of deleting the body of the test, fix the test to use the unused variables

import java.io.IOException;
import java.net.URL;

import com.rarchives.ripme.ripper.rippers.JabArchivesRipper;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you can see this is a stub of a test file that hasn't been implemented yet. I'd rather see someone add an implementation rather than remove parts of the stub.

public void testRedditGfycatRedirectURL() throws IOException, URISyntaxException {
RedditRipper ripper = new RedditRipper(
new URI("https://www.reddit.com/r/NSFW_GIF/comments/ennwsa/gorgeous_tits/").toURL());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test may appear to test nothing but really is expecting that API call to complete without throwing. Update the test to fix it accordingly instead of removing the body of the test.

for (URL url : contentURLs) {
// TwitchVideoRipper ripper = new TwitchVideoRipper(url);
// videoTestHelper(ripper);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The better fix here is to uncomment the loop body and disable the test (mark flaky, see other disabled tests that have done so)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants